{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "5f7fd404-e27c-41a8-ba89-441fb9d5d414",
   "metadata": {},
   "outputs": [],
   "source": [
    "#!pip install mplfinance"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "af6da4a4-6acd-4b34-a5b2-c8300e277f44",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "from sqlalchemy import create_engine \n",
    "import seaborn as sns\n",
    "import mplfinance as fplt\n",
    "from statsmodels.tsa.seasonal import seasonal_decompose\n",
    "\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "from sklearn.model_selection import train_test_split\n",
    "from sklearn.linear_model import LinearRegression\n",
    "from sklearn.metrics import mean_absolute_error\n",
    "from sklearn import linear_model\n",
    "from sklearn.metrics import mean_squared_error\n",
    "from sklearn.metrics import r2_score\n",
    "\n",
    "import re"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "09d0ac11-bb06-4105-a290-002ca9210980",
   "metadata": {},
   "outputs": [],
   "source": [
    "day_features = ['year', 'month', 'day', 'hour', 'dayofweek', 'open', 'low', 'high', 'close', 'volume']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "1e8bce6b-f3ce-47b5-a237-8890db3a51af",
   "metadata": {},
   "outputs": [],
   "source": [
    "db_config = {\n",
    "'user': 'loader', # имя пользователя,\n",
    "'pwd': 'pangolin1L', # пароль,\n",
    "'host': 'localhost',\n",
    "'port': 5432, # порт подключения,\n",
    "'db': 'history' # название базы данных,\n",
    "} \n",
    "\n",
    "connection_string = 'postgresql://{}:{}@{}:{}/{}'.format(\n",
    "    db_config['user'],\n",
    "    db_config['pwd'],\n",
    "    db_config['host'],\n",
    "    db_config['port'],\n",
    "    db_config['db'],\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "ce4a4b2b-aafc-4612-8b5d-3e9339c87d04",
   "metadata": {},
   "outputs": [],
   "source": [
    "engine = create_engine(connection_string) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "7ebc86c8-a7f4-4bce-8ac8-8e5fb27ea147",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>low</th>\n",
       "      <th>high</th>\n",
       "      <th>close</th>\n",
       "      <th>volume</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>time</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2024-01-02 07:00:00</th>\n",
       "      <td>1452.8</td>\n",
       "      <td>1452.0</td>\n",
       "      <td>1465.2</td>\n",
       "      <td>1454.0</td>\n",
       "      <td>561</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2024-01-02 08:00:00</th>\n",
       "      <td>1464.8</td>\n",
       "      <td>1454.0</td>\n",
       "      <td>1466.8</td>\n",
       "      <td>1466.0</td>\n",
       "      <td>659</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2024-01-02 09:00:00</th>\n",
       "      <td>1463.8</td>\n",
       "      <td>1461.0</td>\n",
       "      <td>1472.0</td>\n",
       "      <td>1472.0</td>\n",
       "      <td>835</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2024-01-02 10:00:00</th>\n",
       "      <td>1472.0</td>\n",
       "      <td>1465.0</td>\n",
       "      <td>1472.6</td>\n",
       "      <td>1472.0</td>\n",
       "      <td>640</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2024-01-02 11:00:00</th>\n",
       "      <td>1469.4</td>\n",
       "      <td>1464.0</td>\n",
       "      <td>1473.4</td>\n",
       "      <td>1473.0</td>\n",
       "      <td>473</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                       open     low    high   close  volume\n",
       "time                                                       \n",
       "2024-01-02 07:00:00  1452.8  1452.0  1465.2  1454.0     561\n",
       "2024-01-02 08:00:00  1464.8  1454.0  1466.8  1466.0     659\n",
       "2024-01-02 09:00:00  1463.8  1461.0  1472.0  1472.0     835\n",
       "2024-01-02 10:00:00  1472.0  1465.0  1472.6  1472.0     640\n",
       "2024-01-02 11:00:00  1469.4  1464.0  1473.4  1473.0     473"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "query = '''\n",
    "SELECT time, open, low, high, close, volume FROM public.candle\n",
    "where ticker='NVTK'\n",
    "'''\n",
    "df = pd.read_sql_query(query, con=engine, index_col='time', parse_dates='time')\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "8d46a4dc-26d2-4ae6-a8eb-c43ea8f27f4b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>low</th>\n",
       "      <th>high</th>\n",
       "      <th>close</th>\n",
       "      <th>volume</th>\n",
       "      <th>year</th>\n",
       "      <th>month</th>\n",
       "      <th>day</th>\n",
       "      <th>dayofweek</th>\n",
       "      <th>hour</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>time</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2024-05-12 11:00:00</th>\n",
       "      <td>1232.4</td>\n",
       "      <td>1229.0</td>\n",
       "      <td>1232.4</td>\n",
       "      <td>1230.0</td>\n",
       "      <td>2702</td>\n",
       "      <td>2024</td>\n",
       "      <td>5</td>\n",
       "      <td>12</td>\n",
       "      <td>6</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2024-02-13 18:00:00</th>\n",
       "      <td>1419.6</td>\n",
       "      <td>1419.0</td>\n",
       "      <td>1421.8</td>\n",
       "      <td>1421.0</td>\n",
       "      <td>14205</td>\n",
       "      <td>2024</td>\n",
       "      <td>2</td>\n",
       "      <td>13</td>\n",
       "      <td>1</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2024-04-10 14:00:00</th>\n",
       "      <td>1280.8</td>\n",
       "      <td>1279.0</td>\n",
       "      <td>1283.2</td>\n",
       "      <td>1282.0</td>\n",
       "      <td>79507</td>\n",
       "      <td>2024</td>\n",
       "      <td>4</td>\n",
       "      <td>10</td>\n",
       "      <td>2</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2024-04-06 11:00:00</th>\n",
       "      <td>1286.8</td>\n",
       "      <td>1282.0</td>\n",
       "      <td>1287.4</td>\n",
       "      <td>1287.0</td>\n",
       "      <td>4514</td>\n",
       "      <td>2024</td>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "      <td>5</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2024-05-28 17:00:00</th>\n",
       "      <td>1101.0</td>\n",
       "      <td>1100.0</td>\n",
       "      <td>1109.8</td>\n",
       "      <td>1108.0</td>\n",
       "      <td>84611</td>\n",
       "      <td>2024</td>\n",
       "      <td>5</td>\n",
       "      <td>28</td>\n",
       "      <td>1</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                       open     low    high   close  volume  year  month  day  \\\n",
       "time                                                                            \n",
       "2024-05-12 11:00:00  1232.4  1229.0  1232.4  1230.0    2702  2024      5   12   \n",
       "2024-02-13 18:00:00  1419.6  1419.0  1421.8  1421.0   14205  2024      2   13   \n",
       "2024-04-10 14:00:00  1280.8  1279.0  1283.2  1282.0   79507  2024      4   10   \n",
       "2024-04-06 11:00:00  1286.8  1282.0  1287.4  1287.0    4514  2024      4    6   \n",
       "2024-05-28 17:00:00  1101.0  1100.0  1109.8  1108.0   84611  2024      5   28   \n",
       "\n",
       "                     dayofweek  hour  \n",
       "time                                  \n",
       "2024-05-12 11:00:00          6    11  \n",
       "2024-02-13 18:00:00          1    18  \n",
       "2024-04-10 14:00:00          2    14  \n",
       "2024-04-06 11:00:00          5    11  \n",
       "2024-05-28 17:00:00          1    17  "
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['year'] = df.index.year\n",
    "df['month'] = df.index.month\n",
    "df['day'] = df.index.day\n",
    "df['dayofweek'] = df.index.dayofweek\n",
    "df['hour'] = df.index.hour\n",
    "df.sample(5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "1ddc9a9d-15d8-4cb1-abb4-190c0845b7f1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>year</th>\n",
       "      <th>month</th>\n",
       "      <th>day</th>\n",
       "      <th>dayofweek</th>\n",
       "      <th>hour</th>\n",
       "      <th>open</th>\n",
       "      <th>low</th>\n",
       "      <th>high</th>\n",
       "      <th>close</th>\n",
       "      <th>volume</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>time</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2024-04-28 12:00:00</th>\n",
       "      <td>2024</td>\n",
       "      <td>4</td>\n",
       "      <td>28</td>\n",
       "      <td>6</td>\n",
       "      <td>12</td>\n",
       "      <td>1228.0</td>\n",
       "      <td>1226.0</td>\n",
       "      <td>1228.0</td>\n",
       "      <td>1227.0</td>\n",
       "      <td>3138</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2024-06-03 06:00:00</th>\n",
       "      <td>2024</td>\n",
       "      <td>6</td>\n",
       "      <td>3</td>\n",
       "      <td>0</td>\n",
       "      <td>6</td>\n",
       "      <td>1085.0</td>\n",
       "      <td>1085.0</td>\n",
       "      <td>1085.0</td>\n",
       "      <td>1085.0</td>\n",
       "      <td>788</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2024-04-20 14:00:00</th>\n",
       "      <td>2024</td>\n",
       "      <td>4</td>\n",
       "      <td>20</td>\n",
       "      <td>5</td>\n",
       "      <td>14</td>\n",
       "      <td>1278.4</td>\n",
       "      <td>1278.0</td>\n",
       "      <td>1279.8</td>\n",
       "      <td>1279.0</td>\n",
       "      <td>1566</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2024-03-16 14:00:00</th>\n",
       "      <td>2024</td>\n",
       "      <td>3</td>\n",
       "      <td>16</td>\n",
       "      <td>5</td>\n",
       "      <td>14</td>\n",
       "      <td>1402.8</td>\n",
       "      <td>1400.0</td>\n",
       "      <td>1403.6</td>\n",
       "      <td>1403.0</td>\n",
       "      <td>1704</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2024-02-09 14:00:00</th>\n",
       "      <td>2024</td>\n",
       "      <td>2</td>\n",
       "      <td>9</td>\n",
       "      <td>4</td>\n",
       "      <td>14</td>\n",
       "      <td>1443.6</td>\n",
       "      <td>1440.0</td>\n",
       "      <td>1445.0</td>\n",
       "      <td>1442.0</td>\n",
       "      <td>218399</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                     year  month  day  dayofweek  hour    open     low  \\\n",
       "time                                                                     \n",
       "2024-04-28 12:00:00  2024      4   28          6    12  1228.0  1226.0   \n",
       "2024-06-03 06:00:00  2024      6    3          0     6  1085.0  1085.0   \n",
       "2024-04-20 14:00:00  2024      4   20          5    14  1278.4  1278.0   \n",
       "2024-03-16 14:00:00  2024      3   16          5    14  1402.8  1400.0   \n",
       "2024-02-09 14:00:00  2024      2    9          4    14  1443.6  1440.0   \n",
       "\n",
       "                       high   close  volume  \n",
       "time                                         \n",
       "2024-04-28 12:00:00  1228.0  1227.0    3138  \n",
       "2024-06-03 06:00:00  1085.0  1085.0     788  \n",
       "2024-04-20 14:00:00  1279.8  1279.0    1566  \n",
       "2024-03-16 14:00:00  1403.6  1403.0    1704  \n",
       "2024-02-09 14:00:00  1445.0  1442.0  218399  "
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = df[['year', 'month', 'day', 'dayofweek', 'hour', 'open', 'low', 'high', 'close', 'volume']]\n",
    "df.sample(5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "a00276a0-e2e4-4e30-95b0-2f89682b241a",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:4: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:5: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:6: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:7: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:8: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:10: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:11: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:12: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:13: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
      "/tmp/ipykernel_7590/2229086264.py:14: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  df['volume_l{}'.format(lag)] = df['volume'].shift(lag)\n"
     ]
    }
   ],
   "source": [
    "max_lag = 200\n",
    "for lag in range(1, max_lag + 1):   \n",
    "\n",
    "    df['year_l{}'.format(lag)] = df['year'].shift(lag)\n",
    "    df['month_l{}'.format(lag)] = df['month'].shift(lag)\n",
    "    df['day_l{}'.format(lag)] = df['day'].shift(lag)\n",
    "    df['dayofweek_l{}'.format(lag)] = df['dayofweek'].shift(lag)\n",
    "    df['hour_l{}'.format(lag)] = df['hour'].shift(lag)\n",
    "    \n",
    "    df['open_l{}'.format(lag)] = df['open'].shift(lag)\n",
    "    df['low_l{}'.format(lag)] = df['low'].shift(lag)\n",
    "    df['high_l{}'.format(lag)] = df['high'].shift(lag)\n",
    "    df['close_l{}'.format(lag)] = df['close'].shift(lag)\n",
    "    df['volume_l{}'.format(lag)] = df['volume'].shift(lag)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "2c19f9df-11e6-4d4c-bfd4-af68897cec28",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>time</th>\n",
       "      <th>2024-06-27 11:00:00</th>\n",
       "      <th>2024-06-27 12:00:00</th>\n",
       "      <th>2024-06-27 13:00:00</th>\n",
       "      <th>2024-06-27 14:00:00</th>\n",
       "      <th>2024-06-27 15:00:00</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>year</th>\n",
       "      <td>2024.0</td>\n",
       "      <td>2024.0</td>\n",
       "      <td>2024.0</td>\n",
       "      <td>2024.0</td>\n",
       "      <td>2024.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>month</th>\n",
       "      <td>6.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>6.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>day</th>\n",
       "      <td>27.0</td>\n",
       "      <td>27.0</td>\n",
       "      <td>27.0</td>\n",
       "      <td>27.0</td>\n",
       "      <td>27.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>dayofweek</th>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>hour</th>\n",
       "      <td>11.0</td>\n",
       "      <td>12.0</td>\n",
       "      <td>13.0</td>\n",
       "      <td>14.0</td>\n",
       "      <td>15.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>open_l200</th>\n",
       "      <td>1050.6</td>\n",
       "      <td>1046.4</td>\n",
       "      <td>1044.8</td>\n",
       "      <td>1046.2</td>\n",
       "      <td>1050.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>low_l200</th>\n",
       "      <td>1042.0</td>\n",
       "      <td>1044.0</td>\n",
       "      <td>1044.0</td>\n",
       "      <td>1045.0</td>\n",
       "      <td>1050.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>high_l200</th>\n",
       "      <td>1051.6</td>\n",
       "      <td>1048.6</td>\n",
       "      <td>1047.4</td>\n",
       "      <td>1051.8</td>\n",
       "      <td>1050.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>close_l200</th>\n",
       "      <td>1046.0</td>\n",
       "      <td>1044.0</td>\n",
       "      <td>1046.0</td>\n",
       "      <td>1047.0</td>\n",
       "      <td>1050.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>volume_l200</th>\n",
       "      <td>114879.0</td>\n",
       "      <td>52713.0</td>\n",
       "      <td>31267.0</td>\n",
       "      <td>59714.0</td>\n",
       "      <td>754.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>2010 rows × 5 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "time         2024-06-27 11:00:00  2024-06-27 12:00:00  2024-06-27 13:00:00  \\\n",
       "year                      2024.0               2024.0               2024.0   \n",
       "month                        6.0                  6.0                  6.0   \n",
       "day                         27.0                 27.0                 27.0   \n",
       "dayofweek                    3.0                  3.0                  3.0   \n",
       "hour                        11.0                 12.0                 13.0   \n",
       "...                          ...                  ...                  ...   \n",
       "open_l200                 1050.6               1046.4               1044.8   \n",
       "low_l200                  1042.0               1044.0               1044.0   \n",
       "high_l200                 1051.6               1048.6               1047.4   \n",
       "close_l200                1046.0               1044.0               1046.0   \n",
       "volume_l200             114879.0              52713.0              31267.0   \n",
       "\n",
       "time         2024-06-27 14:00:00  2024-06-27 15:00:00  \n",
       "year                      2024.0               2024.0  \n",
       "month                        6.0                  6.0  \n",
       "day                         27.0                 27.0  \n",
       "dayofweek                    3.0                  3.0  \n",
       "hour                        14.0                 15.0  \n",
       "...                          ...                  ...  \n",
       "open_l200                 1046.2               1050.0  \n",
       "low_l200                  1045.0               1050.0  \n",
       "high_l200                 1051.8               1050.0  \n",
       "close_l200                1047.0               1050.0  \n",
       "volume_l200              59714.0                754.0  \n",
       "\n",
       "[2010 rows x 5 columns]"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.tail().T"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "f0a0241c-5132-46cc-8287-bc147bd1d28a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(2456, 2010)"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "b58f4f3b-4250-49a8-9b1f-4fcf66955129",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(2256, 2010)"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df1 = df.dropna()\n",
    "df1.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "aa875664-2525-478e-af3e-b900c18c316f",
   "metadata": {},
   "outputs": [],
   "source": [
    "df1 = df.dropna()\n",
    "train, test = train_test_split(df1, shuffle=True, test_size = 0.2)\n",
    "\n",
    "target_train = train['close']\n",
    "features_train = train.drop(day_features, axis = 1)\n",
    "\n",
    "target_test = test['close']\n",
    "features_test = test.drop(day_features, axis = 1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "82a44cc7-86de-42fb-bd12-4b6c200fe831",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>year_l1</th>\n",
       "      <th>month_l1</th>\n",
       "      <th>day_l1</th>\n",
       "      <th>dayofweek_l1</th>\n",
       "      <th>hour_l1</th>\n",
       "      <th>open_l1</th>\n",
       "      <th>low_l1</th>\n",
       "      <th>high_l1</th>\n",
       "      <th>close_l1</th>\n",
       "      <th>volume_l1</th>\n",
       "      <th>...</th>\n",
       "      <th>year_l200</th>\n",
       "      <th>month_l200</th>\n",
       "      <th>day_l200</th>\n",
       "      <th>dayofweek_l200</th>\n",
       "      <th>hour_l200</th>\n",
       "      <th>open_l200</th>\n",
       "      <th>low_l200</th>\n",
       "      <th>high_l200</th>\n",
       "      <th>close_l200</th>\n",
       "      <th>volume_l200</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>time</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2024-04-16 11:00:00</th>\n",
       "      <td>2024.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>16.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>10.0</td>\n",
       "      <td>1299.4</td>\n",
       "      <td>1297.0</td>\n",
       "      <td>1300.0</td>\n",
       "      <td>1297.0</td>\n",
       "      <td>21270.0</td>\n",
       "      <td>...</td>\n",
       "      <td>2024.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>12.0</td>\n",
       "      <td>1289.0</td>\n",
       "      <td>1288.0</td>\n",
       "      <td>1293.8</td>\n",
       "      <td>1290.0</td>\n",
       "      <td>229868.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1 rows × 2000 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                     year_l1  month_l1  day_l1  dayofweek_l1  hour_l1  \\\n",
       "time                                                                    \n",
       "2024-04-16 11:00:00   2024.0       4.0    16.0           1.0     10.0   \n",
       "\n",
       "                     open_l1  low_l1  high_l1  close_l1  volume_l1  ...  \\\n",
       "time                                                                ...   \n",
       "2024-04-16 11:00:00   1299.4  1297.0   1300.0    1297.0    21270.0  ...   \n",
       "\n",
       "                     year_l200  month_l200  day_l200  dayofweek_l200  \\\n",
       "time                                                                   \n",
       "2024-04-16 11:00:00     2024.0         4.0       2.0             1.0   \n",
       "\n",
       "                     hour_l200  open_l200  low_l200  high_l200  close_l200  \\\n",
       "time                                                                         \n",
       "2024-04-16 11:00:00       12.0     1289.0    1288.0     1293.8      1290.0   \n",
       "\n",
       "                     volume_l200  \n",
       "time                              \n",
       "2024-04-16 11:00:00     229868.0  \n",
       "\n",
       "[1 rows x 2000 columns]"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "features_test.tail(1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "7f4e1c5d-df8c-4ac7-813f-5a67a0e2662b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "MAE обучающей выборки: 2.696495707770343\n",
      "MAE тестовой выборки:  3.86241103926375\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/dmitrii/anaconda3/lib/python3.11/site-packages/sklearn/linear_model/_coordinate_descent.py:631: ConvergenceWarning: Objective did not converge. You might want to increase the number of iterations, check the scale of the features or consider increasing regularisation. Duality gap: 2.131e+04, tolerance: 3.154e+03\n",
      "  model = cd_fast.enet_coordinate_descent(\n"
     ]
    }
   ],
   "source": [
    "model = linear_model.Lasso(alpha=0.1, max_iter=1000)\n",
    "model.fit(features_train, target_train)\n",
    "\n",
    "pred_train = model.predict(features_train)\n",
    "pred_test = model.predict(features_test)\n",
    "\n",
    "print(\"MAE обучающей выборки:\", mean_absolute_error(target_train, pred_train))\n",
    "print(\"MAE тестовой выборки: \", mean_absolute_error(target_test, pred_test))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "a15093aa-cf06-4537-9dde-e272b8a6a2ef",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "RMSE = 5.78619136557011\n",
      "R2 = 0.9981108013750324\n"
     ]
    }
   ],
   "source": [
    "mse = mean_squared_error(target_test, pred_test)\n",
    "print(\"RMSE =\", mse ** 0.5)\n",
    "print(\"R2 =\", r2_score(target_test, pred_test))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "d0884ec1-3a5a-4fed-8298-ce623009ac48",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1299.0298507948103"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pred_test[-1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "f5f96f70-d1d9-45f1-93d6-43269d96c628",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/tmp/ipykernel_7590/599295876.py:1: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`\n",
      "  target_test[-1]\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "1293.0"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "target_test[-1]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "290821bf-1878-47a6-87fc-9f3a05140acb",
   "metadata": {},
   "source": [
    "## Предсказание значения для следующего часа"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "f27c8bf8-6df6-4c6f-9489-6884d921a379",
   "metadata": {},
   "outputs": [],
   "source": [
    "def extract_number_from_key(key):\n",
    "    # Регулярное выражение для поиска числа после '_l'\n",
    "    pattern = r'_l(\\d+)$'\n",
    "    \n",
    "    # Поиск соответствия регулярному выражению в строке\n",
    "    match = re.search(pattern, key)\n",
    "    \n",
    "    if match:\n",
    "        # Возвращаем найденное число\n",
    "        return match.group(1)\n",
    "    else:\n",
    "        # Если число не найдено, возвращаем None\n",
    "        return None\n",
    "\n",
    "# Пример использования функции\n",
    "#key = \"example_key_l42\"\n",
    "#number = extract_number_from_key(key)\n",
    "#print(number)  # Выведет '42'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "e21c87aa-c434-45e4-a27e-59c3a769e247",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "year -> year_l1 : 2024.0\n",
      "month -> month_l1 : 6.0\n",
      "day -> day_l1 : 27.0\n",
      "dayofweek -> dayofweek_l1 : 3.0\n",
      "hour -> hour_l1 : 15.0\n",
      "open -> open_l1 : 1050.6\n",
      "low -> low_l1 : 1049.0\n",
      "high -> high_l1 : 1051.4\n",
      "close -> close_l1 : 1050.0\n",
      "volume -> volume_l1 : 15297.0\n",
      "year_l1 -> year_l2 : 2024.0\n",
      "month_l1 -> month_l2 : 6.0\n",
      "day_l1 -> day_l2 : 27.0\n",
      "dayofweek_l1 -> dayofweek_l2 : 3.0\n",
      "hour_l1 -> hour_l2 : 14.0\n",
      "open_l1 -> open_l2 : 1051.2\n",
      "low_l1 -> low_l2 : 1047.0\n",
      "high_l1 -> high_l2 : 1051.4\n",
      "close_l1 -> close_l2 : 1050.0\n",
      "volume_l1 -> volume_l2 : 51768.0\n",
      "year_l2 -> year_l3 : 2024.0\n",
      "month_l2 -> month_l3 : 6.0\n",
      "day_l2 -> day_l3 : 27.0\n",
      "dayofweek_l2 -> dayofweek_l3 : 3.0\n",
      "hour_l2 -> hour_l3 : 13.0\n",
      "open_l2 -> open_l3 : 1053.4\n",
      "low_l2 -> low_l3 : 1049.0\n",
      "high_l2 -> high_l3 : 1054.0\n",
      "close_l2 -> close_l3 : 1050.0\n",
      "volume_l2 -> volume_l3 : 72761.0\n",
      "year_l3 -> year_l4 : 2024.0\n",
      "month_l3 -> month_l4 : 6.0\n",
      "day_l3 -> day_l4 : 27.0\n",
      "dayofweek_l3 -> dayofweek_l4 : 3.0\n",
      "hour_l3 -> hour_l4 : 12.0\n",
      "open_l3 -> open_l4 : 1050.2\n",
      "low_l3 -> low_l4 : 1049.0\n",
      "high_l3 -> high_l4 : 1054.0\n",
      "close_l3 -> close_l4 : 1053.0\n",
      "volume_l3 -> volume_l4 : 60417.0\n",
      "year_l4 -> year_l5 : 2024.0\n",
      "month_l4 -> month_l5 : 6.0\n",
      "day_l4 -> day_l5 : 27.0\n",
      "dayofweek_l4 -> dayofweek_l5 : 3.0\n",
      "hour_l4 -> hour_l5 : 11.0\n",
      "open_l4 -> open_l5 : 1053.6\n",
      "low_l4 -> low_l5 : 1049.0\n",
      "high_l4 -> high_l5 : 1053.6\n",
      "close_l4 -> close_l5 : 1050.0\n",
      "volume_l4 -> volume_l5 : 48301.0\n",
      "year_l5 -> year_l6 : 2024.0\n",
      "month_l5 -> month_l6 : 6.0\n",
      "day_l5 -> day_l6 : 27.0\n",
      "dayofweek_l5 -> dayofweek_l6 : 3.0\n",
      "hour_l5 -> hour_l6 : 10.0\n",
      "open_l5 -> open_l6 : 1047.0\n",
      "low_l5 -> low_l6 : 1045.0\n",
      "high_l5 -> high_l6 : 1054.6\n",
      "close_l5 -> close_l6 : 1053.0\n",
      "volume_l5 -> volume_l6 : 112098.0\n",
      "year_l6 -> year_l7 : 2024.0\n",
      "month_l6 -> month_l7 : 6.0\n",
      "day_l6 -> day_l7 : 27.0\n",
      "dayofweek_l6 -> dayofweek_l7 : 3.0\n",
      "hour_l6 -> hour_l7 : 9.0\n",
      "open_l6 -> open_l7 : 1048.2\n",
      "low_l6 -> low_l7 : 1045.0\n",
      "high_l6 -> high_l7 : 1049.2\n",
      "close_l6 -> close_l7 : 1046.0\n",
      "volume_l6 -> volume_l7 : 54803.0\n",
      "year_l7 -> year_l8 : 2024.0\n",
      "month_l7 -> month_l8 : 6.0\n",
      "day_l7 -> day_l8 : 27.0\n",
      "dayofweek_l7 -> dayofweek_l8 : 3.0\n",
      "hour_l7 -> hour_l8 : 8.0\n",
      "open_l7 -> open_l8 : 1049.2\n",
      "low_l7 -> low_l8 : 1045.0\n",
      "high_l7 -> high_l8 : 1051.8\n",
      "close_l7 -> close_l8 : 1048.0\n",
      "volume_l7 -> volume_l8 : 90919.0\n",
      "year_l8 -> year_l9 : 2024.0\n",
      "month_l8 -> month_l9 : 6.0\n",
      "day_l8 -> day_l9 : 27.0\n",
      "dayofweek_l8 -> dayofweek_l9 : 3.0\n",
      "hour_l8 -> hour_l9 : 7.0\n",
      "open_l8 -> open_l9 : 1059.0\n",
      "low_l8 -> low_l9 : 1045.0\n",
      "high_l8 -> high_l9 : 1060.0\n",
      "close_l8 -> close_l9 : 1049.0\n",
      "volume_l8 -> volume_l9 : 267073.0\n",
      "year_l9 -> year_l10 : 2024.0\n",
      "month_l9 -> month_l10 : 6.0\n",
      "day_l9 -> day_l10 : 27.0\n",
      "dayofweek_l9 -> dayofweek_l10 : 3.0\n",
      "hour_l9 -> hour_l10 : 6.0\n",
      "open_l9 -> open_l10 : 1059.0\n",
      "low_l9 -> low_l10 : 1059.0\n",
      "high_l9 -> high_l10 : 1059.0\n",
      "close_l9 -> close_l10 : 1059.0\n",
      "volume_l9 -> volume_l10 : 586.0\n",
      "year_l10 -> year_l11 : 2024.0\n",
      "month_l10 -> month_l11 : 6.0\n",
      "day_l10 -> day_l11 : 26.0\n",
      "dayofweek_l10 -> dayofweek_l11 : 2.0\n",
      "hour_l10 -> hour_l11 : 20.0\n",
      "open_l10 -> open_l11 : 1058.0\n",
      "low_l10 -> low_l11 : 1056.0\n",
      "high_l10 -> high_l11 : 1060.6\n",
      "close_l10 -> close_l11 : 1056.0\n",
      "volume_l10 -> volume_l11 : 42198.0\n",
      "year_l11 -> year_l12 : 2024.0\n",
      "month_l11 -> month_l12 : 6.0\n",
      "day_l11 -> day_l12 : 26.0\n",
      "dayofweek_l11 -> dayofweek_l12 : 2.0\n",
      "hour_l11 -> hour_l12 : 19.0\n",
      "open_l11 -> open_l12 : 1056.8\n",
      "low_l11 -> low_l12 : 1055.0\n",
      "high_l11 -> high_l12 : 1058.4\n",
      "close_l11 -> close_l12 : 1058.0\n",
      "volume_l11 -> volume_l12 : 34731.0\n",
      "year_l12 -> year_l13 : 2024.0\n",
      "month_l12 -> month_l13 : 6.0\n",
      "day_l12 -> day_l13 : 26.0\n",
      "dayofweek_l12 -> dayofweek_l13 : 2.0\n",
      "hour_l12 -> hour_l13 : 18.0\n",
      "open_l12 -> open_l13 : 1057.6\n",
      "low_l12 -> low_l13 : 1056.0\n",
      "high_l12 -> high_l13 : 1058.4\n",
      "close_l12 -> close_l13 : 1057.0\n",
      "volume_l12 -> volume_l13 : 17130.0\n",
      "year_l13 -> year_l14 : 2024.0\n",
      "month_l13 -> month_l14 : 6.0\n",
      "day_l13 -> day_l14 : 26.0\n",
      "dayofweek_l13 -> dayofweek_l14 : 2.0\n",
      "hour_l13 -> hour_l14 : 17.0\n",
      "open_l13 -> open_l14 : 1058.0\n",
      "low_l13 -> low_l14 : 1056.0\n",
      "high_l13 -> high_l14 : 1061.0\n",
      "close_l13 -> close_l14 : 1057.0\n",
      "volume_l13 -> volume_l14 : 54108.0\n",
      "year_l14 -> year_l15 : 2024.0\n",
      "month_l14 -> month_l15 : 6.0\n",
      "day_l14 -> day_l15 : 26.0\n",
      "dayofweek_l14 -> dayofweek_l15 : 2.0\n",
      "hour_l14 -> hour_l15 : 16.0\n",
      "open_l14 -> open_l15 : 1055.4\n",
      "low_l14 -> low_l15 : 1053.0\n",
      "high_l14 -> high_l15 : 1060.0\n",
      "close_l14 -> close_l15 : 1057.0\n",
      "volume_l14 -> volume_l15 : 51783.0\n",
      "year_l15 -> year_l16 : 2024.0\n",
      "month_l15 -> month_l16 : 6.0\n",
      "day_l15 -> day_l16 : 26.0\n",
      "dayofweek_l15 -> dayofweek_l16 : 2.0\n",
      "hour_l15 -> hour_l16 : 15.0\n",
      "open_l15 -> open_l16 : 1054.4\n",
      "low_l15 -> low_l16 : 1052.0\n",
      "high_l15 -> high_l16 : 1055.2\n",
      "close_l15 -> close_l16 : 1054.0\n",
      "volume_l15 -> volume_l16 : 33242.0\n",
      "year_l16 -> year_l17 : 2024.0\n",
      "month_l16 -> month_l17 : 6.0\n",
      "day_l16 -> day_l17 : 26.0\n",
      "dayofweek_l16 -> dayofweek_l17 : 2.0\n",
      "hour_l16 -> hour_l17 : 14.0\n",
      "open_l16 -> open_l17 : 1056.8\n",
      "low_l16 -> low_l17 : 1052.0\n",
      "high_l16 -> high_l17 : 1057.6\n",
      "close_l16 -> close_l17 : 1054.0\n",
      "volume_l16 -> volume_l17 : 71442.0\n",
      "year_l17 -> year_l18 : 2024.0\n",
      "month_l17 -> month_l18 : 6.0\n",
      "day_l17 -> day_l18 : 26.0\n",
      "dayofweek_l17 -> dayofweek_l18 : 2.0\n",
      "hour_l17 -> hour_l18 : 13.0\n",
      "open_l17 -> open_l18 : 1052.4\n",
      "low_l17 -> low_l18 : 1050.0\n",
      "high_l17 -> high_l18 : 1057.0\n",
      "close_l17 -> close_l18 : 1056.0\n",
      "volume_l17 -> volume_l18 : 129478.0\n",
      "year_l18 -> year_l19 : 2024.0\n",
      "month_l18 -> month_l19 : 6.0\n",
      "day_l18 -> day_l19 : 26.0\n",
      "dayofweek_l18 -> dayofweek_l19 : 2.0\n",
      "hour_l18 -> hour_l19 : 12.0\n",
      "open_l18 -> open_l19 : 1060.2\n",
      "low_l18 -> low_l19 : 1051.0\n",
      "high_l18 -> high_l19 : 1060.4\n",
      "close_l18 -> close_l19 : 1052.0\n",
      "volume_l18 -> volume_l19 : 163604.0\n",
      "year_l19 -> year_l20 : 2024.0\n",
      "month_l19 -> month_l20 : 6.0\n",
      "day_l19 -> day_l20 : 26.0\n",
      "dayofweek_l19 -> dayofweek_l20 : 2.0\n",
      "hour_l19 -> hour_l20 : 11.0\n",
      "open_l19 -> open_l20 : 1059.2\n",
      "low_l19 -> low_l20 : 1058.0\n",
      "high_l19 -> high_l20 : 1062.2\n",
      "close_l19 -> close_l20 : 1060.0\n",
      "volume_l19 -> volume_l20 : 52335.0\n",
      "year_l20 -> year_l21 : 2024.0\n",
      "month_l20 -> month_l21 : 6.0\n",
      "day_l20 -> day_l21 : 26.0\n",
      "dayofweek_l20 -> dayofweek_l21 : 2.0\n",
      "hour_l20 -> hour_l21 : 10.0\n",
      "open_l20 -> open_l21 : 1060.8\n",
      "low_l20 -> low_l21 : 1058.0\n",
      "high_l20 -> high_l21 : 1063.2\n",
      "close_l20 -> close_l21 : 1059.0\n",
      "volume_l20 -> volume_l21 : 92274.0\n",
      "year_l21 -> year_l22 : 2024.0\n",
      "month_l21 -> month_l22 : 6.0\n",
      "day_l21 -> day_l22 : 26.0\n",
      "dayofweek_l21 -> dayofweek_l22 : 2.0\n",
      "hour_l21 -> hour_l22 : 9.0\n",
      "open_l21 -> open_l22 : 1059.8\n",
      "low_l21 -> low_l22 : 1052.0\n",
      "high_l21 -> high_l22 : 1063.0\n",
      "close_l21 -> close_l22 : 1060.0\n",
      "volume_l21 -> volume_l22 : 142640.0\n",
      "year_l22 -> year_l23 : 2024.0\n",
      "month_l22 -> month_l23 : 6.0\n",
      "day_l22 -> day_l23 : 26.0\n",
      "dayofweek_l22 -> dayofweek_l23 : 2.0\n",
      "hour_l22 -> hour_l23 : 8.0\n",
      "open_l22 -> open_l23 : 1059.0\n",
      "low_l22 -> low_l23 : 1058.0\n",
      "high_l22 -> high_l23 : 1066.0\n",
      "close_l22 -> close_l23 : 1059.0\n",
      "volume_l22 -> volume_l23 : 337018.0\n",
      "year_l23 -> year_l24 : 2024.0\n",
      "month_l23 -> month_l24 : 6.0\n",
      "day_l23 -> day_l24 : 26.0\n",
      "dayofweek_l23 -> dayofweek_l24 : 2.0\n",
      "hour_l23 -> hour_l24 : 7.0\n",
      "open_l23 -> open_l24 : 1058.8\n",
      "low_l23 -> low_l24 : 1055.0\n",
      "high_l23 -> high_l24 : 1064.4\n",
      "close_l23 -> close_l24 : 1058.0\n",
      "volume_l23 -> volume_l24 : 327481.0\n",
      "year_l24 -> year_l25 : 2024.0\n",
      "month_l24 -> month_l25 : 6.0\n",
      "day_l24 -> day_l25 : 26.0\n",
      "dayofweek_l24 -> dayofweek_l25 : 2.0\n",
      "hour_l24 -> hour_l25 : 6.0\n",
      "open_l24 -> open_l25 : 1058.8\n",
      "low_l24 -> low_l25 : 1058.0\n",
      "high_l24 -> high_l25 : 1058.8\n",
      "close_l24 -> close_l25 : 1058.0\n",
      "volume_l24 -> volume_l25 : 4928.0\n",
      "year_l25 -> year_l26 : 2024.0\n",
      "month_l25 -> month_l26 : 6.0\n",
      "day_l25 -> day_l26 : 25.0\n",
      "dayofweek_l25 -> dayofweek_l26 : 1.0\n",
      "hour_l25 -> hour_l26 : 20.0\n",
      "open_l25 -> open_l26 : 1057.8\n",
      "low_l25 -> low_l26 : 1055.0\n",
      "high_l25 -> high_l26 : 1060.0\n",
      "close_l25 -> close_l26 : 1056.0\n",
      "volume_l25 -> volume_l26 : 79928.0\n",
      "year_l26 -> year_l27 : 2024.0\n",
      "month_l26 -> month_l27 : 6.0\n",
      "day_l26 -> day_l27 : 25.0\n",
      "dayofweek_l26 -> dayofweek_l27 : 1.0\n",
      "hour_l26 -> hour_l27 : 19.0\n",
      "open_l26 -> open_l27 : 1054.0\n",
      "low_l26 -> low_l27 : 1052.0\n",
      "high_l26 -> high_l27 : 1058.0\n",
      "close_l26 -> close_l27 : 1058.0\n",
      "volume_l26 -> volume_l27 : 98588.0\n",
      "year_l27 -> year_l28 : 2024.0\n",
      "month_l27 -> month_l28 : 6.0\n",
      "day_l27 -> day_l28 : 25.0\n",
      "dayofweek_l27 -> dayofweek_l28 : 1.0\n",
      "hour_l27 -> hour_l28 : 18.0\n",
      "open_l27 -> open_l28 : 1051.6\n",
      "low_l27 -> low_l28 : 1050.0\n",
      "high_l27 -> high_l28 : 1054.0\n",
      "close_l27 -> close_l28 : 1054.0\n",
      "volume_l27 -> volume_l28 : 35132.0\n",
      "year_l28 -> year_l29 : 2024.0\n",
      "month_l28 -> month_l29 : 6.0\n",
      "day_l28 -> day_l29 : 25.0\n",
      "dayofweek_l28 -> dayofweek_l29 : 1.0\n",
      "hour_l28 -> hour_l29 : 17.0\n",
      "open_l28 -> open_l29 : 1052.0\n",
      "low_l28 -> low_l29 : 1051.0\n",
      "high_l28 -> high_l29 : 1053.0\n",
      "close_l28 -> close_l29 : 1051.0\n",
      "volume_l28 -> volume_l29 : 36527.0\n",
      "year_l29 -> year_l30 : 2024.0\n",
      "month_l29 -> month_l30 : 6.0\n",
      "day_l29 -> day_l30 : 25.0\n",
      "dayofweek_l29 -> dayofweek_l30 : 1.0\n",
      "hour_l29 -> hour_l30 : 16.0\n",
      "open_l29 -> open_l30 : 1047.8\n",
      "low_l29 -> low_l30 : 1047.0\n",
      "high_l29 -> high_l30 : 1053.8\n",
      "close_l29 -> close_l30 : 1052.0\n",
      "volume_l29 -> volume_l30 : 147438.0\n",
      "year_l30 -> year_l31 : 2024.0\n",
      "month_l30 -> month_l31 : 6.0\n",
      "day_l30 -> day_l31 : 25.0\n",
      "dayofweek_l30 -> dayofweek_l31 : 1.0\n",
      "hour_l30 -> hour_l31 : 15.0\n",
      "open_l30 -> open_l31 : 1044.0\n",
      "low_l30 -> low_l31 : 1043.0\n",
      "high_l30 -> high_l31 : 1048.2\n",
      "close_l30 -> close_l31 : 1046.0\n",
      "volume_l30 -> volume_l31 : 68239.0\n",
      "year_l31 -> year_l32 : 2024.0\n",
      "month_l31 -> month_l32 : 6.0\n",
      "day_l31 -> day_l32 : 25.0\n",
      "dayofweek_l31 -> dayofweek_l32 : 1.0\n",
      "hour_l31 -> hour_l32 : 14.0\n",
      "open_l31 -> open_l32 : 1046.8\n",
      "low_l31 -> low_l32 : 1041.0\n",
      "high_l31 -> high_l32 : 1047.4\n",
      "close_l31 -> close_l32 : 1044.0\n",
      "volume_l31 -> volume_l32 : 84493.0\n",
      "year_l32 -> year_l33 : 2024.0\n",
      "month_l32 -> month_l33 : 6.0\n",
      "day_l32 -> day_l33 : 25.0\n",
      "dayofweek_l32 -> dayofweek_l33 : 1.0\n",
      "hour_l32 -> hour_l33 : 13.0\n",
      "open_l32 -> open_l33 : 1043.8\n",
      "low_l32 -> low_l33 : 1043.0\n",
      "high_l32 -> high_l33 : 1048.2\n",
      "close_l32 -> close_l33 : 1046.0\n",
      "volume_l32 -> volume_l33 : 99854.0\n",
      "year_l33 -> year_l34 : 2024.0\n",
      "month_l33 -> month_l34 : 6.0\n",
      "day_l33 -> day_l34 : 25.0\n",
      "dayofweek_l33 -> dayofweek_l34 : 1.0\n",
      "hour_l33 -> hour_l34 : 12.0\n",
      "open_l33 -> open_l34 : 1040.8\n",
      "low_l33 -> low_l34 : 1040.0\n",
      "high_l33 -> high_l34 : 1044.6\n",
      "close_l33 -> close_l34 : 1043.0\n",
      "volume_l33 -> volume_l34 : 59981.0\n",
      "year_l34 -> year_l35 : 2024.0\n",
      "month_l34 -> month_l35 : 6.0\n",
      "day_l34 -> day_l35 : 25.0\n",
      "dayofweek_l34 -> dayofweek_l35 : 1.0\n",
      "hour_l34 -> hour_l35 : 11.0\n",
      "open_l34 -> open_l35 : 1041.0\n",
      "low_l34 -> low_l35 : 1040.0\n",
      "high_l34 -> high_l35 : 1044.8\n",
      "close_l34 -> close_l35 : 1041.0\n",
      "volume_l34 -> volume_l35 : 56203.0\n",
      "year_l35 -> year_l36 : 2024.0\n",
      "month_l35 -> month_l36 : 6.0\n",
      "day_l35 -> day_l36 : 25.0\n",
      "dayofweek_l35 -> dayofweek_l36 : 1.0\n",
      "hour_l35 -> hour_l36 : 10.0\n",
      "open_l35 -> open_l36 : 1039.8\n",
      "low_l35 -> low_l36 : 1039.0\n",
      "high_l35 -> high_l36 : 1047.4\n",
      "close_l35 -> close_l36 : 1041.0\n",
      "volume_l35 -> volume_l36 : 137384.0\n",
      "year_l36 -> year_l37 : 2024.0\n",
      "month_l36 -> month_l37 : 6.0\n",
      "day_l36 -> day_l37 : 25.0\n",
      "dayofweek_l36 -> dayofweek_l37 : 1.0\n",
      "hour_l36 -> hour_l37 : 9.0\n",
      "open_l36 -> open_l37 : 1042.0\n",
      "low_l36 -> low_l37 : 1039.0\n",
      "high_l36 -> high_l37 : 1045.0\n",
      "close_l36 -> close_l37 : 1039.0\n",
      "volume_l36 -> volume_l37 : 103715.0\n",
      "year_l37 -> year_l38 : 2024.0\n",
      "month_l37 -> month_l38 : 6.0\n",
      "day_l37 -> day_l38 : 25.0\n",
      "dayofweek_l37 -> dayofweek_l38 : 1.0\n",
      "hour_l37 -> hour_l38 : 8.0\n",
      "open_l37 -> open_l38 : 1046.8\n",
      "low_l37 -> low_l38 : 1041.0\n",
      "high_l37 -> high_l38 : 1051.2\n",
      "close_l37 -> close_l38 : 1042.0\n",
      "volume_l37 -> volume_l38 : 133532.0\n",
      "year_l38 -> year_l39 : 2024.0\n",
      "month_l38 -> month_l39 : 6.0\n",
      "day_l38 -> day_l39 : 25.0\n",
      "dayofweek_l38 -> dayofweek_l39 : 1.0\n",
      "hour_l38 -> hour_l39 : 7.0\n",
      "open_l38 -> open_l39 : 1044.0\n",
      "low_l38 -> low_l39 : 1040.0\n",
      "high_l38 -> high_l39 : 1048.2\n",
      "close_l38 -> close_l39 : 1046.0\n",
      "volume_l38 -> volume_l39 : 126664.0\n",
      "year_l39 -> year_l40 : 2024.0\n",
      "month_l39 -> month_l40 : 6.0\n",
      "day_l39 -> day_l40 : 25.0\n",
      "dayofweek_l39 -> dayofweek_l40 : 1.0\n",
      "hour_l39 -> hour_l40 : 6.0\n",
      "open_l39 -> open_l40 : 1043.6\n",
      "low_l39 -> low_l40 : 1043.0\n",
      "high_l39 -> high_l40 : 1043.6\n",
      "close_l39 -> close_l40 : 1043.0\n",
      "volume_l39 -> volume_l40 : 557.0\n",
      "year_l40 -> year_l41 : 2024.0\n",
      "month_l40 -> month_l41 : 6.0\n",
      "day_l40 -> day_l41 : 24.0\n",
      "dayofweek_l40 -> dayofweek_l41 : 0.0\n",
      "hour_l40 -> hour_l41 : 20.0\n",
      "open_l40 -> open_l41 : 1044.6\n",
      "low_l40 -> low_l41 : 1041.0\n",
      "high_l40 -> high_l41 : 1044.6\n",
      "close_l40 -> close_l41 : 1043.0\n",
      "volume_l40 -> volume_l41 : 16635.0\n",
      "year_l41 -> year_l42 : 2024.0\n",
      "month_l41 -> month_l42 : 6.0\n",
      "day_l41 -> day_l42 : 24.0\n",
      "dayofweek_l41 -> dayofweek_l42 : 0.0\n",
      "hour_l41 -> hour_l42 : 19.0\n",
      "open_l41 -> open_l42 : 1044.4\n",
      "low_l41 -> low_l42 : 1044.0\n",
      "high_l41 -> high_l42 : 1045.6\n",
      "close_l41 -> close_l42 : 1044.0\n",
      "volume_l41 -> volume_l42 : 23865.0\n",
      "year_l42 -> year_l43 : 2024.0\n",
      "month_l42 -> month_l43 : 6.0\n",
      "day_l42 -> day_l43 : 24.0\n",
      "dayofweek_l42 -> dayofweek_l43 : 0.0\n",
      "hour_l42 -> hour_l43 : 18.0\n",
      "open_l42 -> open_l43 : 1045.0\n",
      "low_l42 -> low_l43 : 1043.0\n",
      "high_l42 -> high_l43 : 1045.2\n",
      "close_l42 -> close_l43 : 1044.0\n",
      "volume_l42 -> volume_l43 : 9984.0\n",
      "year_l43 -> year_l44 : 2024.0\n",
      "month_l43 -> month_l44 : 6.0\n",
      "day_l43 -> day_l44 : 24.0\n",
      "dayofweek_l43 -> dayofweek_l44 : 0.0\n",
      "hour_l43 -> hour_l44 : 17.0\n",
      "open_l43 -> open_l44 : 1043.0\n",
      "low_l43 -> low_l44 : 1043.0\n",
      "high_l43 -> high_l44 : 1048.0\n",
      "close_l43 -> close_l44 : 1045.0\n",
      "volume_l43 -> volume_l44 : 67980.0\n",
      "year_l44 -> year_l45 : 2024.0\n",
      "month_l44 -> month_l45 : 6.0\n",
      "day_l44 -> day_l45 : 24.0\n",
      "dayofweek_l44 -> dayofweek_l45 : 0.0\n",
      "hour_l44 -> hour_l45 : 16.0\n",
      "open_l44 -> open_l45 : 1040.8\n",
      "low_l44 -> low_l45 : 1038.0\n",
      "high_l44 -> high_l45 : 1044.0\n",
      "close_l44 -> close_l45 : 1043.0\n",
      "volume_l44 -> volume_l45 : 40635.0\n",
      "year_l45 -> year_l46 : 2024.0\n",
      "month_l45 -> month_l46 : 6.0\n",
      "day_l45 -> day_l46 : 24.0\n",
      "dayofweek_l45 -> dayofweek_l46 : 0.0\n",
      "hour_l45 -> hour_l46 : 15.0\n",
      "open_l45 -> open_l46 : 1044.0\n",
      "low_l45 -> low_l46 : 1038.0\n",
      "high_l45 -> high_l46 : 1044.0\n",
      "close_l45 -> close_l46 : 1038.0\n",
      "volume_l45 -> volume_l46 : 62239.0\n",
      "year_l46 -> year_l47 : 2024.0\n",
      "month_l46 -> month_l47 : 6.0\n",
      "day_l46 -> day_l47 : 24.0\n",
      "dayofweek_l46 -> dayofweek_l47 : 0.0\n",
      "hour_l46 -> hour_l47 : 14.0\n",
      "open_l46 -> open_l47 : 1044.2\n",
      "low_l46 -> low_l47 : 1040.0\n",
      "high_l46 -> high_l47 : 1044.8\n",
      "close_l46 -> close_l47 : 1043.0\n",
      "volume_l46 -> volume_l47 : 73198.0\n",
      "year_l47 -> year_l48 : 2024.0\n",
      "month_l47 -> month_l48 : 6.0\n",
      "day_l47 -> day_l48 : 24.0\n",
      "dayofweek_l47 -> dayofweek_l48 : 0.0\n",
      "hour_l47 -> hour_l48 : 13.0\n",
      "open_l47 -> open_l48 : 1042.0\n",
      "low_l47 -> low_l48 : 1039.0\n",
      "high_l47 -> high_l48 : 1044.4\n",
      "close_l47 -> close_l48 : 1044.0\n",
      "volume_l47 -> volume_l48 : 78739.0\n",
      "year_l48 -> year_l49 : 2024.0\n",
      "month_l48 -> month_l49 : 6.0\n",
      "day_l48 -> day_l49 : 24.0\n",
      "dayofweek_l48 -> dayofweek_l49 : 0.0\n",
      "hour_l48 -> hour_l49 : 12.0\n",
      "open_l48 -> open_l49 : 1049.4\n",
      "low_l48 -> low_l49 : 1037.0\n",
      "high_l48 -> high_l49 : 1049.6\n",
      "close_l48 -> close_l49 : 1042.0\n",
      "volume_l48 -> volume_l49 : 253262.0\n",
      "year_l49 -> year_l50 : 2024.0\n",
      "month_l49 -> month_l50 : 6.0\n",
      "day_l49 -> day_l50 : 24.0\n",
      "dayofweek_l49 -> dayofweek_l50 : 0.0\n",
      "hour_l49 -> hour_l50 : 11.0\n",
      "open_l49 -> open_l50 : 1048.6\n",
      "low_l49 -> low_l50 : 1045.0\n",
      "high_l49 -> high_l50 : 1057.4\n",
      "close_l49 -> close_l50 : 1049.0\n",
      "volume_l49 -> volume_l50 : 171467.0\n",
      "year_l50 -> year_l51 : 2024.0\n",
      "month_l50 -> month_l51 : 6.0\n",
      "day_l50 -> day_l51 : 24.0\n",
      "dayofweek_l50 -> dayofweek_l51 : 0.0\n",
      "hour_l50 -> hour_l51 : 10.0\n",
      "open_l50 -> open_l51 : 1046.0\n",
      "low_l50 -> low_l51 : 1040.0\n",
      "high_l50 -> high_l51 : 1050.0\n",
      "close_l50 -> close_l51 : 1048.0\n",
      "volume_l50 -> volume_l51 : 127928.0\n",
      "year_l51 -> year_l52 : 2024.0\n",
      "month_l51 -> month_l52 : 6.0\n",
      "day_l51 -> day_l52 : 24.0\n",
      "dayofweek_l51 -> dayofweek_l52 : 0.0\n",
      "hour_l51 -> hour_l52 : 9.0\n",
      "open_l51 -> open_l52 : 1046.2\n",
      "low_l51 -> low_l52 : 1042.0\n",
      "high_l51 -> high_l52 : 1050.0\n",
      "close_l51 -> close_l52 : 1046.0\n",
      "volume_l51 -> volume_l52 : 142055.0\n",
      "year_l52 -> year_l53 : 2024.0\n",
      "month_l52 -> month_l53 : 6.0\n",
      "day_l52 -> day_l53 : 24.0\n",
      "dayofweek_l52 -> dayofweek_l53 : 0.0\n",
      "hour_l52 -> hour_l53 : 8.0\n",
      "open_l52 -> open_l53 : 1045.6\n",
      "low_l52 -> low_l53 : 1041.0\n",
      "high_l52 -> high_l53 : 1048.8\n",
      "close_l52 -> close_l53 : 1046.0\n",
      "volume_l52 -> volume_l53 : 107974.0\n",
      "year_l53 -> year_l54 : 2024.0\n",
      "month_l53 -> month_l54 : 6.0\n",
      "day_l53 -> day_l54 : 24.0\n",
      "dayofweek_l53 -> dayofweek_l54 : 0.0\n",
      "hour_l53 -> hour_l54 : 7.0\n",
      "open_l53 -> open_l54 : 1045.0\n",
      "low_l53 -> low_l54 : 1040.0\n",
      "high_l53 -> high_l54 : 1053.2\n",
      "close_l53 -> close_l54 : 1045.0\n",
      "volume_l53 -> volume_l54 : 374723.0\n",
      "year_l54 -> year_l55 : 2024.0\n",
      "month_l54 -> month_l55 : 6.0\n",
      "day_l54 -> day_l55 : 24.0\n",
      "dayofweek_l54 -> dayofweek_l55 : 0.0\n",
      "hour_l54 -> hour_l55 : 6.0\n",
      "open_l54 -> open_l55 : 1045.0\n",
      "low_l54 -> low_l55 : 1045.0\n",
      "high_l54 -> high_l55 : 1045.0\n",
      "close_l54 -> close_l55 : 1045.0\n",
      "volume_l54 -> volume_l55 : 5401.0\n",
      "year_l55 -> year_l56 : 2024.0\n",
      "month_l55 -> month_l56 : 6.0\n",
      "day_l55 -> day_l56 : 23.0\n",
      "dayofweek_l55 -> dayofweek_l56 : 6.0\n",
      "hour_l55 -> hour_l56 : 20.0\n",
      "open_l55 -> open_l56 : 1045.0\n",
      "low_l55 -> low_l56 : 1040.0\n",
      "high_l55 -> high_l56 : 1045.0\n",
      "close_l55 -> close_l56 : 1040.0\n",
      "volume_l55 -> volume_l56 : 848.0\n",
      "year_l56 -> year_l57 : 2024.0\n",
      "month_l56 -> month_l57 : 6.0\n",
      "day_l56 -> day_l57 : 23.0\n",
      "dayofweek_l56 -> dayofweek_l57 : 6.0\n",
      "hour_l56 -> hour_l57 : 19.0\n",
      "open_l56 -> open_l57 : 1044.2\n",
      "low_l56 -> low_l57 : 1043.0\n",
      "high_l56 -> high_l57 : 1046.0\n",
      "close_l56 -> close_l57 : 1045.0\n",
      "volume_l56 -> volume_l57 : 4460.0\n",
      "year_l57 -> year_l58 : 2024.0\n",
      "month_l57 -> month_l58 : 6.0\n",
      "day_l57 -> day_l58 : 23.0\n",
      "dayofweek_l57 -> dayofweek_l58 : 6.0\n",
      "hour_l57 -> hour_l58 : 18.0\n",
      "open_l57 -> open_l58 : 1044.8\n",
      "low_l57 -> low_l58 : 1043.0\n",
      "high_l57 -> high_l58 : 1045.0\n",
      "close_l57 -> close_l58 : 1044.0\n",
      "volume_l57 -> volume_l58 : 9921.0\n",
      "year_l58 -> year_l59 : 2024.0\n",
      "month_l58 -> month_l59 : 6.0\n",
      "day_l58 -> day_l59 : 23.0\n",
      "dayofweek_l58 -> dayofweek_l59 : 6.0\n",
      "hour_l58 -> hour_l59 : 17.0\n",
      "open_l58 -> open_l59 : 1044.0\n",
      "low_l58 -> low_l59 : 1043.0\n",
      "high_l58 -> high_l59 : 1044.8\n",
      "close_l58 -> close_l59 : 1044.0\n",
      "volume_l58 -> volume_l59 : 5471.0\n",
      "year_l59 -> year_l60 : 2024.0\n",
      "month_l59 -> month_l60 : 6.0\n",
      "day_l59 -> day_l60 : 23.0\n",
      "dayofweek_l59 -> dayofweek_l60 : 6.0\n",
      "hour_l59 -> hour_l60 : 16.0\n",
      "open_l59 -> open_l60 : 1043.6\n",
      "low_l59 -> low_l60 : 1039.0\n",
      "high_l59 -> high_l60 : 1044.4\n",
      "close_l59 -> close_l60 : 1043.0\n",
      "volume_l59 -> volume_l60 : 5151.0\n",
      "year_l60 -> year_l61 : 2024.0\n",
      "month_l60 -> month_l61 : 6.0\n",
      "day_l60 -> day_l61 : 23.0\n",
      "dayofweek_l60 -> dayofweek_l61 : 6.0\n",
      "hour_l60 -> hour_l61 : 15.0\n",
      "open_l60 -> open_l61 : 1040.0\n",
      "low_l60 -> low_l61 : 1039.0\n",
      "high_l60 -> high_l61 : 1044.0\n",
      "close_l60 -> close_l61 : 1043.0\n",
      "volume_l60 -> volume_l61 : 5354.0\n",
      "year_l61 -> year_l62 : 2024.0\n",
      "month_l61 -> month_l62 : 6.0\n",
      "day_l61 -> day_l62 : 23.0\n",
      "dayofweek_l61 -> dayofweek_l62 : 6.0\n",
      "hour_l61 -> hour_l62 : 14.0\n",
      "open_l61 -> open_l62 : 1040.4\n",
      "low_l61 -> low_l62 : 1037.0\n",
      "high_l61 -> high_l62 : 1041.0\n",
      "close_l61 -> close_l62 : 1041.0\n",
      "volume_l61 -> volume_l62 : 2400.0\n",
      "year_l62 -> year_l63 : 2024.0\n",
      "month_l62 -> month_l63 : 6.0\n",
      "day_l62 -> day_l63 : 23.0\n",
      "dayofweek_l62 -> dayofweek_l63 : 6.0\n",
      "hour_l62 -> hour_l63 : 13.0\n",
      "open_l62 -> open_l63 : 1038.6\n",
      "low_l62 -> low_l63 : 1037.0\n",
      "high_l62 -> high_l63 : 1041.8\n",
      "close_l62 -> close_l63 : 1040.0\n",
      "volume_l62 -> volume_l63 : 7820.0\n",
      "year_l63 -> year_l64 : 2024.0\n",
      "month_l63 -> month_l64 : 6.0\n",
      "day_l63 -> day_l64 : 23.0\n",
      "dayofweek_l63 -> dayofweek_l64 : 6.0\n",
      "hour_l63 -> hour_l64 : 12.0\n",
      "open_l63 -> open_l64 : 1038.0\n",
      "low_l63 -> low_l64 : 1036.0\n",
      "high_l63 -> high_l64 : 1038.8\n",
      "close_l63 -> close_l64 : 1037.0\n",
      "volume_l63 -> volume_l64 : 2294.0\n",
      "year_l64 -> year_l65 : 2024.0\n",
      "month_l64 -> month_l65 : 6.0\n",
      "day_l64 -> day_l65 : 23.0\n",
      "dayofweek_l64 -> dayofweek_l65 : 6.0\n",
      "hour_l64 -> hour_l65 : 11.0\n",
      "open_l64 -> open_l65 : 1037.0\n",
      "low_l64 -> low_l65 : 1036.0\n",
      "high_l64 -> high_l65 : 1038.8\n",
      "close_l64 -> close_l65 : 1037.0\n",
      "volume_l64 -> volume_l65 : 5240.0\n",
      "year_l65 -> year_l66 : 2024.0\n",
      "month_l65 -> month_l66 : 6.0\n",
      "day_l65 -> day_l66 : 23.0\n",
      "dayofweek_l65 -> dayofweek_l66 : 6.0\n",
      "hour_l65 -> hour_l66 : 10.0\n",
      "open_l65 -> open_l66 : 1035.8\n",
      "low_l65 -> low_l66 : 1035.0\n",
      "high_l65 -> high_l66 : 1037.6\n",
      "close_l65 -> close_l66 : 1037.0\n",
      "volume_l65 -> volume_l66 : 6498.0\n",
      "year_l66 -> year_l67 : 2024.0\n",
      "month_l66 -> month_l67 : 6.0\n",
      "day_l66 -> day_l67 : 23.0\n",
      "dayofweek_l66 -> dayofweek_l67 : 6.0\n",
      "hour_l66 -> hour_l67 : 9.0\n",
      "open_l66 -> open_l67 : 1036.4\n",
      "low_l66 -> low_l67 : 1035.0\n",
      "high_l66 -> high_l67 : 1037.0\n",
      "close_l66 -> close_l67 : 1035.0\n",
      "volume_l66 -> volume_l67 : 5785.0\n",
      "year_l67 -> year_l68 : 2024.0\n",
      "month_l67 -> month_l68 : 6.0\n",
      "day_l67 -> day_l68 : 23.0\n",
      "dayofweek_l67 -> dayofweek_l68 : 6.0\n",
      "hour_l67 -> hour_l68 : 8.0\n",
      "open_l67 -> open_l68 : 1036.6\n",
      "low_l67 -> low_l68 : 1035.0\n",
      "high_l67 -> high_l68 : 1036.6\n",
      "close_l67 -> close_l68 : 1035.0\n",
      "volume_l67 -> volume_l68 : 1512.0\n",
      "year_l68 -> year_l69 : 2024.0\n",
      "month_l68 -> month_l69 : 6.0\n",
      "day_l68 -> day_l69 : 23.0\n",
      "dayofweek_l68 -> dayofweek_l69 : 6.0\n",
      "hour_l68 -> hour_l69 : 7.0\n",
      "open_l68 -> open_l69 : 1037.8\n",
      "low_l68 -> low_l69 : 1035.0\n",
      "high_l68 -> high_l69 : 1037.8\n",
      "close_l68 -> close_l69 : 1035.0\n",
      "volume_l68 -> volume_l69 : 4861.0\n",
      "year_l69 -> year_l70 : 2024.0\n",
      "month_l69 -> month_l70 : 6.0\n",
      "day_l69 -> day_l70 : 22.0\n",
      "dayofweek_l69 -> dayofweek_l70 : 5.0\n",
      "hour_l69 -> hour_l70 : 20.0\n",
      "open_l69 -> open_l70 : 1037.8\n",
      "low_l69 -> low_l70 : 1035.0\n",
      "high_l69 -> high_l70 : 1037.8\n",
      "close_l69 -> close_l70 : 1037.0\n",
      "volume_l69 -> volume_l70 : 320.0\n",
      "year_l70 -> year_l71 : 2024.0\n",
      "month_l70 -> month_l71 : 6.0\n",
      "day_l70 -> day_l71 : 22.0\n",
      "dayofweek_l70 -> dayofweek_l71 : 5.0\n",
      "hour_l70 -> hour_l71 : 19.0\n",
      "open_l70 -> open_l71 : 1035.6\n",
      "low_l70 -> low_l71 : 1035.0\n",
      "high_l70 -> high_l71 : 1037.8\n",
      "close_l70 -> close_l71 : 1037.0\n",
      "volume_l70 -> volume_l71 : 766.0\n",
      "year_l71 -> year_l72 : 2024.0\n",
      "month_l71 -> month_l72 : 6.0\n",
      "day_l71 -> day_l72 : 22.0\n",
      "dayofweek_l71 -> dayofweek_l72 : 5.0\n",
      "hour_l71 -> hour_l72 : 18.0\n",
      "open_l71 -> open_l72 : 1035.4\n",
      "low_l71 -> low_l72 : 1035.0\n",
      "high_l71 -> high_l72 : 1036.8\n",
      "close_l71 -> close_l72 : 1036.0\n",
      "volume_l71 -> volume_l72 : 2354.0\n",
      "year_l72 -> year_l73 : 2024.0\n",
      "month_l72 -> month_l73 : 6.0\n",
      "day_l72 -> day_l73 : 22.0\n",
      "dayofweek_l72 -> dayofweek_l73 : 5.0\n",
      "hour_l72 -> hour_l73 : 17.0\n",
      "open_l72 -> open_l73 : 1036.6\n",
      "low_l72 -> low_l73 : 1035.0\n",
      "high_l72 -> high_l73 : 1036.6\n",
      "close_l72 -> close_l73 : 1035.0\n",
      "volume_l72 -> volume_l73 : 1056.0\n",
      "year_l73 -> year_l74 : 2024.0\n",
      "month_l73 -> month_l74 : 6.0\n",
      "day_l73 -> day_l74 : 22.0\n",
      "dayofweek_l73 -> dayofweek_l74 : 5.0\n",
      "hour_l73 -> hour_l74 : 16.0\n",
      "open_l73 -> open_l74 : 1037.8\n",
      "low_l73 -> low_l74 : 1035.0\n",
      "high_l73 -> high_l74 : 1038.0\n",
      "close_l73 -> close_l74 : 1036.0\n",
      "volume_l73 -> volume_l74 : 2890.0\n",
      "year_l74 -> year_l75 : 2024.0\n",
      "month_l74 -> month_l75 : 6.0\n",
      "day_l74 -> day_l75 : 22.0\n",
      "dayofweek_l74 -> dayofweek_l75 : 5.0\n",
      "hour_l74 -> hour_l75 : 15.0\n",
      "open_l74 -> open_l75 : 1037.2\n",
      "low_l74 -> low_l75 : 1035.0\n",
      "high_l74 -> high_l75 : 1038.0\n",
      "close_l74 -> close_l75 : 1037.0\n",
      "volume_l74 -> volume_l75 : 1116.0\n",
      "year_l75 -> year_l76 : 2024.0\n",
      "month_l75 -> month_l76 : 6.0\n",
      "day_l75 -> day_l76 : 22.0\n",
      "dayofweek_l75 -> dayofweek_l76 : 5.0\n",
      "hour_l75 -> hour_l76 : 14.0\n",
      "open_l75 -> open_l76 : 1036.4\n",
      "low_l75 -> low_l76 : 1035.0\n",
      "high_l75 -> high_l76 : 1037.6\n",
      "close_l75 -> close_l76 : 1037.0\n",
      "volume_l75 -> volume_l76 : 2712.0\n",
      "year_l76 -> year_l77 : 2024.0\n",
      "month_l76 -> month_l77 : 6.0\n",
      "day_l76 -> day_l77 : 22.0\n",
      "dayofweek_l76 -> dayofweek_l77 : 5.0\n",
      "hour_l76 -> hour_l77 : 13.0\n",
      "open_l76 -> open_l77 : 1037.0\n",
      "low_l76 -> low_l77 : 1035.0\n",
      "high_l76 -> high_l77 : 1037.8\n",
      "close_l76 -> close_l77 : 1036.0\n",
      "volume_l76 -> volume_l77 : 3886.0\n",
      "year_l77 -> year_l78 : 2024.0\n",
      "month_l77 -> month_l78 : 6.0\n",
      "day_l77 -> day_l78 : 22.0\n",
      "dayofweek_l77 -> dayofweek_l78 : 5.0\n",
      "hour_l77 -> hour_l78 : 12.0\n",
      "open_l77 -> open_l78 : 1036.8\n",
      "low_l77 -> low_l78 : 1035.0\n",
      "high_l77 -> high_l78 : 1038.2\n",
      "close_l77 -> close_l78 : 1037.0\n",
      "volume_l77 -> volume_l78 : 1938.0\n",
      "year_l78 -> year_l79 : 2024.0\n",
      "month_l78 -> month_l79 : 6.0\n",
      "day_l78 -> day_l79 : 22.0\n",
      "dayofweek_l78 -> dayofweek_l79 : 5.0\n",
      "hour_l78 -> hour_l79 : 11.0\n",
      "open_l78 -> open_l79 : 1037.4\n",
      "low_l78 -> low_l79 : 1035.0\n",
      "high_l78 -> high_l79 : 1037.4\n",
      "close_l78 -> close_l79 : 1035.0\n",
      "volume_l78 -> volume_l79 : 2948.0\n",
      "year_l79 -> year_l80 : 2024.0\n",
      "month_l79 -> month_l80 : 6.0\n",
      "day_l79 -> day_l80 : 22.0\n",
      "dayofweek_l79 -> dayofweek_l80 : 5.0\n",
      "hour_l79 -> hour_l80 : 10.0\n",
      "open_l79 -> open_l80 : 1037.0\n",
      "low_l79 -> low_l80 : 1035.0\n",
      "high_l79 -> high_l80 : 1038.6\n",
      "close_l79 -> close_l80 : 1037.0\n",
      "volume_l79 -> volume_l80 : 4570.0\n",
      "year_l80 -> year_l81 : 2024.0\n",
      "month_l80 -> month_l81 : 6.0\n",
      "day_l80 -> day_l81 : 21.0\n",
      "dayofweek_l80 -> dayofweek_l81 : 4.0\n",
      "hour_l80 -> hour_l81 : 10.0\n",
      "open_l80 -> open_l81 : 1041.6\n",
      "low_l80 -> low_l81 : 1041.0\n",
      "high_l80 -> high_l81 : 1050.0\n",
      "close_l80 -> close_l81 : 1047.0\n",
      "volume_l80 -> volume_l81 : 104105.0\n",
      "year_l81 -> year_l82 : 2024.0\n",
      "month_l81 -> month_l82 : 6.0\n",
      "day_l81 -> day_l82 : 20.0\n",
      "dayofweek_l81 -> dayofweek_l82 : 3.0\n",
      "hour_l81 -> hour_l82 : 6.0\n",
      "open_l81 -> open_l82 : 1054.8\n",
      "low_l81 -> low_l82 : 1054.0\n",
      "high_l81 -> high_l82 : 1054.8\n",
      "close_l81 -> close_l82 : 1054.0\n",
      "volume_l81 -> volume_l82 : 6713.0\n",
      "year_l82 -> year_l83 : 2024.0\n",
      "month_l82 -> month_l83 : 6.0\n",
      "day_l82 -> day_l83 : 22.0\n",
      "dayofweek_l82 -> dayofweek_l83 : 5.0\n",
      "hour_l82 -> hour_l83 : 9.0\n",
      "open_l82 -> open_l83 : 1038.6\n",
      "low_l82 -> low_l83 : 1035.0\n",
      "high_l82 -> high_l83 : 1039.0\n",
      "close_l82 -> close_l83 : 1035.0\n",
      "volume_l82 -> volume_l83 : 15889.0\n",
      "year_l83 -> year_l84 : 2024.0\n",
      "month_l83 -> month_l84 : 6.0\n",
      "day_l83 -> day_l84 : 22.0\n",
      "dayofweek_l83 -> dayofweek_l84 : 5.0\n",
      "hour_l83 -> hour_l84 : 8.0\n",
      "open_l83 -> open_l84 : 1040.0\n",
      "low_l83 -> low_l84 : 1036.0\n",
      "high_l83 -> high_l84 : 1040.6\n",
      "close_l83 -> close_l84 : 1036.0\n",
      "volume_l83 -> volume_l84 : 5678.0\n",
      "year_l84 -> year_l85 : 2024.0\n",
      "month_l84 -> month_l85 : 6.0\n",
      "day_l84 -> day_l85 : 22.0\n",
      "dayofweek_l84 -> dayofweek_l85 : 5.0\n",
      "hour_l84 -> hour_l85 : 7.0\n",
      "open_l84 -> open_l85 : 1035.8\n",
      "low_l84 -> low_l85 : 1035.0\n",
      "high_l84 -> high_l85 : 1040.8\n",
      "close_l84 -> close_l85 : 1040.0\n",
      "volume_l84 -> volume_l85 : 5927.0\n",
      "year_l85 -> year_l86 : 2024.0\n",
      "month_l85 -> month_l86 : 6.0\n",
      "day_l85 -> day_l86 : 21.0\n",
      "dayofweek_l85 -> dayofweek_l86 : 4.0\n",
      "hour_l85 -> hour_l86 : 20.0\n",
      "open_l85 -> open_l86 : 1041.8\n",
      "low_l85 -> low_l86 : 1039.0\n",
      "high_l85 -> high_l86 : 1042.0\n",
      "close_l85 -> close_l86 : 1040.0\n",
      "volume_l85 -> volume_l86 : 38367.0\n",
      "year_l86 -> year_l87 : 2024.0\n",
      "month_l86 -> month_l87 : 6.0\n",
      "day_l86 -> day_l87 : 21.0\n",
      "dayofweek_l86 -> dayofweek_l87 : 4.0\n",
      "hour_l86 -> hour_l87 : 19.0\n",
      "open_l86 -> open_l87 : 1041.4\n",
      "low_l86 -> low_l87 : 1041.0\n",
      "high_l86 -> high_l87 : 1042.8\n",
      "close_l86 -> close_l87 : 1041.0\n",
      "volume_l86 -> volume_l87 : 25188.0\n",
      "year_l87 -> year_l88 : 2024.0\n",
      "month_l87 -> month_l88 : 6.0\n",
      "day_l87 -> day_l88 : 21.0\n",
      "dayofweek_l87 -> dayofweek_l88 : 4.0\n",
      "hour_l87 -> hour_l88 : 18.0\n",
      "open_l87 -> open_l88 : 1042.4\n",
      "low_l87 -> low_l88 : 1040.0\n",
      "high_l87 -> high_l88 : 1042.4\n",
      "close_l87 -> close_l88 : 1041.0\n",
      "volume_l87 -> volume_l88 : 21950.0\n",
      "year_l88 -> year_l89 : 2024.0\n",
      "month_l88 -> month_l89 : 6.0\n",
      "day_l88 -> day_l89 : 21.0\n",
      "dayofweek_l88 -> dayofweek_l89 : 4.0\n",
      "hour_l88 -> hour_l89 : 17.0\n",
      "open_l88 -> open_l89 : 1040.2\n",
      "low_l88 -> low_l89 : 1040.0\n",
      "high_l88 -> high_l89 : 1044.0\n",
      "close_l88 -> close_l89 : 1042.0\n",
      "volume_l88 -> volume_l89 : 29238.0\n",
      "year_l89 -> year_l90 : 2024.0\n",
      "month_l89 -> month_l90 : 6.0\n",
      "day_l89 -> day_l90 : 21.0\n",
      "dayofweek_l89 -> dayofweek_l90 : 4.0\n",
      "hour_l89 -> hour_l90 : 16.0\n",
      "open_l89 -> open_l90 : 1042.4\n",
      "low_l89 -> low_l90 : 1035.0\n",
      "high_l89 -> high_l90 : 1045.8\n",
      "close_l89 -> close_l90 : 1040.0\n",
      "volume_l89 -> volume_l90 : 122476.0\n",
      "year_l90 -> year_l91 : 2024.0\n",
      "month_l90 -> month_l91 : 6.0\n",
      "day_l90 -> day_l91 : 21.0\n",
      "dayofweek_l90 -> dayofweek_l91 : 4.0\n",
      "hour_l90 -> hour_l91 : 15.0\n",
      "open_l90 -> open_l91 : 1046.0\n",
      "low_l90 -> low_l91 : 1043.0\n",
      "high_l90 -> high_l91 : 1046.2\n",
      "close_l90 -> close_l91 : 1044.0\n",
      "volume_l90 -> volume_l91 : 70166.0\n",
      "year_l91 -> year_l92 : 2024.0\n",
      "month_l91 -> month_l92 : 6.0\n",
      "day_l91 -> day_l92 : 21.0\n",
      "dayofweek_l91 -> dayofweek_l92 : 4.0\n",
      "hour_l91 -> hour_l92 : 14.0\n",
      "open_l91 -> open_l92 : 1047.8\n",
      "low_l91 -> low_l92 : 1043.0\n",
      "high_l91 -> high_l92 : 1047.8\n",
      "close_l91 -> close_l92 : 1046.0\n",
      "volume_l91 -> volume_l92 : 70214.0\n",
      "year_l92 -> year_l93 : 2024.0\n",
      "month_l92 -> month_l93 : 6.0\n",
      "day_l92 -> day_l93 : 21.0\n",
      "dayofweek_l92 -> dayofweek_l93 : 4.0\n",
      "hour_l92 -> hour_l93 : 13.0\n",
      "open_l92 -> open_l93 : 1048.0\n",
      "low_l92 -> low_l93 : 1044.0\n",
      "high_l92 -> high_l93 : 1052.6\n",
      "close_l92 -> close_l93 : 1047.0\n",
      "volume_l92 -> volume_l93 : 91655.0\n",
      "year_l93 -> year_l94 : 2024.0\n",
      "month_l93 -> month_l94 : 6.0\n",
      "day_l93 -> day_l94 : 21.0\n",
      "dayofweek_l93 -> dayofweek_l94 : 4.0\n",
      "hour_l93 -> hour_l94 : 12.0\n",
      "open_l93 -> open_l94 : 1045.2\n",
      "low_l93 -> low_l94 : 1044.0\n",
      "high_l93 -> high_l94 : 1053.4\n",
      "close_l93 -> close_l94 : 1048.0\n",
      "volume_l93 -> volume_l94 : 121779.0\n",
      "year_l94 -> year_l95 : 2024.0\n",
      "month_l94 -> month_l95 : 6.0\n",
      "day_l94 -> day_l95 : 21.0\n",
      "dayofweek_l94 -> dayofweek_l95 : 4.0\n",
      "hour_l94 -> hour_l95 : 11.0\n",
      "open_l94 -> open_l95 : 1047.6\n",
      "low_l94 -> low_l95 : 1042.0\n",
      "high_l94 -> high_l95 : 1050.0\n",
      "close_l94 -> close_l95 : 1045.0\n",
      "volume_l94 -> volume_l95 : 91462.0\n",
      "year_l95 -> year_l96 : 2024.0\n",
      "month_l95 -> month_l96 : 6.0\n",
      "day_l95 -> day_l96 : 21.0\n",
      "dayofweek_l95 -> dayofweek_l96 : 4.0\n",
      "hour_l95 -> hour_l96 : 9.0\n",
      "open_l95 -> open_l96 : 1047.0\n",
      "low_l95 -> low_l96 : 1041.0\n",
      "high_l95 -> high_l96 : 1047.8\n",
      "close_l95 -> close_l96 : 1041.0\n",
      "volume_l95 -> volume_l96 : 93214.0\n",
      "year_l96 -> year_l97 : 2024.0\n",
      "month_l96 -> month_l97 : 6.0\n",
      "day_l96 -> day_l97 : 21.0\n",
      "dayofweek_l96 -> dayofweek_l97 : 4.0\n",
      "hour_l96 -> hour_l97 : 8.0\n",
      "open_l96 -> open_l97 : 1048.4\n",
      "low_l96 -> low_l97 : 1043.0\n",
      "high_l96 -> high_l97 : 1051.0\n",
      "close_l96 -> close_l97 : 1046.0\n",
      "volume_l96 -> volume_l97 : 115203.0\n",
      "year_l97 -> year_l98 : 2024.0\n",
      "month_l97 -> month_l98 : 6.0\n",
      "day_l97 -> day_l98 : 21.0\n",
      "dayofweek_l97 -> dayofweek_l98 : 4.0\n",
      "hour_l97 -> hour_l98 : 7.0\n",
      "open_l97 -> open_l98 : 1053.2\n",
      "low_l97 -> low_l98 : 1041.0\n",
      "high_l97 -> high_l98 : 1058.0\n",
      "close_l97 -> close_l98 : 1048.0\n",
      "volume_l97 -> volume_l98 : 415157.0\n",
      "year_l98 -> year_l99 : 2024.0\n",
      "month_l98 -> month_l99 : 6.0\n",
      "day_l98 -> day_l99 : 21.0\n",
      "dayofweek_l98 -> dayofweek_l99 : 4.0\n",
      "hour_l98 -> hour_l99 : 6.0\n",
      "open_l98 -> open_l99 : 1053.0\n",
      "low_l98 -> low_l99 : 1053.0\n",
      "high_l98 -> high_l99 : 1053.0\n",
      "close_l98 -> close_l99 : 1053.0\n",
      "volume_l98 -> volume_l99 : 6832.0\n",
      "year_l99 -> year_l100 : 2024.0\n",
      "month_l99 -> month_l100 : 6.0\n",
      "day_l99 -> day_l100 : 20.0\n",
      "dayofweek_l99 -> dayofweek_l100 : 3.0\n",
      "hour_l99 -> hour_l100 : 20.0\n",
      "open_l99 -> open_l100 : 1059.2\n",
      "low_l99 -> low_l100 : 1054.0\n",
      "high_l99 -> high_l100 : 1060.6\n",
      "close_l99 -> close_l100 : 1054.0\n",
      "volume_l99 -> volume_l100 : 50285.0\n",
      "year_l100 -> year_l101 : 2024.0\n",
      "month_l100 -> month_l101 : 6.0\n",
      "day_l100 -> day_l101 : 20.0\n",
      "dayofweek_l100 -> dayofweek_l101 : 3.0\n",
      "hour_l100 -> hour_l101 : 19.0\n",
      "open_l100 -> open_l101 : 1060.0\n",
      "low_l100 -> low_l101 : 1057.0\n",
      "high_l100 -> high_l101 : 1063.0\n",
      "close_l100 -> close_l101 : 1059.0\n",
      "volume_l100 -> volume_l101 : 71973.0\n",
      "year_l101 -> year_l102 : 2024.0\n",
      "month_l101 -> month_l102 : 6.0\n",
      "day_l101 -> day_l102 : 20.0\n",
      "dayofweek_l101 -> dayofweek_l102 : 3.0\n",
      "hour_l101 -> hour_l102 : 18.0\n",
      "open_l101 -> open_l102 : 1057.4\n",
      "low_l101 -> low_l102 : 1056.0\n",
      "high_l101 -> high_l102 : 1061.0\n",
      "close_l101 -> close_l102 : 1060.0\n",
      "volume_l101 -> volume_l102 : 53250.0\n",
      "year_l102 -> year_l103 : 2024.0\n",
      "month_l102 -> month_l103 : 6.0\n",
      "day_l102 -> day_l103 : 20.0\n",
      "dayofweek_l102 -> dayofweek_l103 : 3.0\n",
      "hour_l102 -> hour_l103 : 17.0\n",
      "open_l102 -> open_l103 : 1053.6\n",
      "low_l102 -> low_l103 : 1053.0\n",
      "high_l102 -> high_l103 : 1059.4\n",
      "close_l102 -> close_l103 : 1057.0\n",
      "volume_l102 -> volume_l103 : 66677.0\n",
      "year_l103 -> year_l104 : 2024.0\n",
      "month_l103 -> month_l104 : 6.0\n",
      "day_l103 -> day_l104 : 20.0\n",
      "dayofweek_l103 -> dayofweek_l104 : 3.0\n",
      "hour_l103 -> hour_l104 : 16.0\n",
      "open_l103 -> open_l104 : 1055.4\n",
      "low_l103 -> low_l104 : 1052.0\n",
      "high_l103 -> high_l104 : 1061.6\n",
      "close_l103 -> close_l104 : 1053.0\n",
      "volume_l103 -> volume_l104 : 176613.0\n",
      "year_l104 -> year_l105 : 2024.0\n",
      "month_l104 -> month_l105 : 6.0\n",
      "day_l104 -> day_l105 : 20.0\n",
      "dayofweek_l104 -> dayofweek_l105 : 3.0\n",
      "hour_l104 -> hour_l105 : 15.0\n",
      "open_l104 -> open_l105 : 1054.8\n",
      "low_l104 -> low_l105 : 1052.0\n",
      "high_l104 -> high_l105 : 1059.0\n",
      "close_l104 -> close_l105 : 1055.0\n",
      "volume_l104 -> volume_l105 : 231838.0\n",
      "year_l105 -> year_l106 : 2024.0\n",
      "month_l105 -> month_l106 : 6.0\n",
      "day_l105 -> day_l106 : 20.0\n",
      "dayofweek_l105 -> dayofweek_l106 : 3.0\n",
      "hour_l105 -> hour_l106 : 14.0\n",
      "open_l105 -> open_l106 : 1048.8\n",
      "low_l105 -> low_l106 : 1043.0\n",
      "high_l105 -> high_l106 : 1055.0\n",
      "close_l105 -> close_l106 : 1055.0\n",
      "volume_l105 -> volume_l106 : 201162.0\n",
      "year_l106 -> year_l107 : 2024.0\n",
      "month_l106 -> month_l107 : 6.0\n",
      "day_l106 -> day_l107 : 20.0\n",
      "dayofweek_l106 -> dayofweek_l107 : 3.0\n",
      "hour_l106 -> hour_l107 : 13.0\n",
      "open_l106 -> open_l107 : 1040.2\n",
      "low_l106 -> low_l107 : 1040.0\n",
      "high_l106 -> high_l107 : 1053.8\n",
      "close_l106 -> close_l107 : 1048.0\n",
      "volume_l106 -> volume_l107 : 288881.0\n",
      "year_l107 -> year_l108 : 2024.0\n",
      "month_l107 -> month_l108 : 6.0\n",
      "day_l107 -> day_l108 : 20.0\n",
      "dayofweek_l107 -> dayofweek_l108 : 3.0\n",
      "hour_l107 -> hour_l108 : 12.0\n",
      "open_l107 -> open_l108 : 1035.8\n",
      "low_l107 -> low_l108 : 1035.0\n",
      "high_l107 -> high_l108 : 1066.0\n",
      "close_l107 -> close_l108 : 1040.0\n",
      "volume_l107 -> volume_l108 : 2246058.0\n",
      "year_l108 -> year_l109 : 2024.0\n",
      "month_l108 -> month_l109 : 6.0\n",
      "day_l108 -> day_l109 : 20.0\n",
      "dayofweek_l108 -> dayofweek_l109 : 3.0\n",
      "hour_l108 -> hour_l109 : 11.0\n",
      "open_l108 -> open_l109 : 1039.0\n",
      "low_l108 -> low_l109 : 1025.0\n",
      "high_l108 -> high_l109 : 1042.0\n",
      "close_l108 -> close_l109 : 1035.0\n",
      "volume_l108 -> volume_l109 : 781017.0\n",
      "year_l109 -> year_l110 : 2024.0\n",
      "month_l109 -> month_l110 : 6.0\n",
      "day_l109 -> day_l110 : 20.0\n",
      "dayofweek_l109 -> dayofweek_l110 : 3.0\n",
      "hour_l109 -> hour_l110 : 10.0\n",
      "open_l109 -> open_l110 : 1048.8\n",
      "low_l109 -> low_l110 : 1032.0\n",
      "high_l109 -> high_l110 : 1048.8\n",
      "close_l109 -> close_l110 : 1039.0\n",
      "volume_l109 -> volume_l110 : 566907.0\n",
      "year_l110 -> year_l111 : 2024.0\n",
      "month_l110 -> month_l111 : 6.0\n",
      "day_l110 -> day_l111 : 20.0\n",
      "dayofweek_l110 -> dayofweek_l111 : 3.0\n",
      "hour_l110 -> hour_l111 : 9.0\n",
      "open_l110 -> open_l111 : 1056.0\n",
      "low_l110 -> low_l111 : 1039.0\n",
      "high_l110 -> high_l111 : 1056.6\n",
      "close_l110 -> close_l111 : 1048.0\n",
      "volume_l110 -> volume_l111 : 495843.0\n",
      "year_l111 -> year_l112 : 2024.0\n",
      "month_l111 -> month_l112 : 6.0\n",
      "day_l111 -> day_l112 : 20.0\n",
      "dayofweek_l111 -> dayofweek_l112 : 3.0\n",
      "hour_l111 -> hour_l112 : 8.0\n",
      "open_l111 -> open_l112 : 1060.0\n",
      "low_l111 -> low_l112 : 1051.0\n",
      "high_l111 -> high_l112 : 1064.6\n",
      "close_l111 -> close_l112 : 1056.0\n",
      "volume_l111 -> volume_l112 : 390821.0\n",
      "year_l112 -> year_l113 : 2024.0\n",
      "month_l112 -> month_l113 : 6.0\n",
      "day_l112 -> day_l113 : 20.0\n",
      "dayofweek_l112 -> dayofweek_l113 : 3.0\n",
      "hour_l112 -> hour_l113 : 7.0\n",
      "open_l112 -> open_l113 : 1053.4\n",
      "low_l112 -> low_l113 : 1045.0\n",
      "high_l112 -> high_l113 : 1059.8\n",
      "close_l112 -> close_l113 : 1059.0\n",
      "volume_l112 -> volume_l113 : 836290.0\n",
      "year_l113 -> year_l114 : 2024.0\n",
      "month_l113 -> month_l114 : 6.0\n",
      "day_l113 -> day_l114 : 19.0\n",
      "dayofweek_l113 -> dayofweek_l114 : 2.0\n",
      "hour_l113 -> hour_l114 : 20.0\n",
      "open_l113 -> open_l114 : 1048.6\n",
      "low_l113 -> low_l114 : 1047.0\n",
      "high_l113 -> high_l114 : 1056.6\n",
      "close_l113 -> close_l114 : 1056.0\n",
      "volume_l113 -> volume_l114 : 90848.0\n",
      "year_l114 -> year_l115 : 2024.0\n",
      "month_l114 -> month_l115 : 6.0\n",
      "day_l114 -> day_l115 : 19.0\n",
      "dayofweek_l114 -> dayofweek_l115 : 2.0\n",
      "hour_l114 -> hour_l115 : 19.0\n",
      "open_l114 -> open_l115 : 1048.4\n",
      "low_l114 -> low_l115 : 1046.0\n",
      "high_l114 -> high_l115 : 1050.4\n",
      "close_l114 -> close_l115 : 1048.0\n",
      "volume_l114 -> volume_l115 : 51758.0\n",
      "year_l115 -> year_l116 : 2024.0\n",
      "month_l115 -> month_l116 : 6.0\n",
      "day_l115 -> day_l116 : 19.0\n",
      "dayofweek_l115 -> dayofweek_l116 : 2.0\n",
      "hour_l115 -> hour_l116 : 18.0\n",
      "open_l115 -> open_l116 : 1044.8\n",
      "low_l115 -> low_l116 : 1044.0\n",
      "high_l115 -> high_l116 : 1054.0\n",
      "close_l115 -> close_l116 : 1048.0\n",
      "volume_l115 -> volume_l116 : 138520.0\n",
      "year_l116 -> year_l117 : 2024.0\n",
      "month_l116 -> month_l117 : 6.0\n",
      "day_l116 -> day_l117 : 19.0\n",
      "dayofweek_l116 -> dayofweek_l117 : 2.0\n",
      "hour_l116 -> hour_l117 : 17.0\n",
      "open_l116 -> open_l117 : 1043.4\n",
      "low_l116 -> low_l117 : 1036.0\n",
      "high_l116 -> high_l117 : 1046.2\n",
      "close_l116 -> close_l117 : 1045.0\n",
      "volume_l116 -> volume_l117 : 96046.0\n",
      "year_l117 -> year_l118 : 2024.0\n",
      "month_l117 -> month_l118 : 6.0\n",
      "day_l117 -> day_l118 : 19.0\n",
      "dayofweek_l117 -> dayofweek_l118 : 2.0\n",
      "hour_l117 -> hour_l118 : 16.0\n",
      "open_l117 -> open_l118 : 1038.0\n",
      "low_l117 -> low_l118 : 1030.0\n",
      "high_l117 -> high_l118 : 1044.4\n",
      "close_l117 -> close_l118 : 1043.0\n",
      "volume_l117 -> volume_l118 : 174258.0\n",
      "year_l118 -> year_l119 : 2024.0\n",
      "month_l118 -> month_l119 : 6.0\n",
      "day_l118 -> day_l119 : 19.0\n",
      "dayofweek_l118 -> dayofweek_l119 : 2.0\n",
      "hour_l118 -> hour_l119 : 15.0\n",
      "open_l118 -> open_l119 : 1029.8\n",
      "low_l118 -> low_l119 : 1022.0\n",
      "high_l118 -> high_l119 : 1034.8\n",
      "close_l118 -> close_l119 : 1030.0\n",
      "volume_l118 -> volume_l119 : 196450.0\n",
      "year_l119 -> year_l120 : 2024.0\n",
      "month_l119 -> month_l120 : 6.0\n",
      "day_l119 -> day_l120 : 19.0\n",
      "dayofweek_l119 -> dayofweek_l120 : 2.0\n",
      "hour_l119 -> hour_l120 : 14.0\n",
      "open_l119 -> open_l120 : 1042.4\n",
      "low_l119 -> low_l120 : 1022.0\n",
      "high_l119 -> high_l120 : 1043.0\n",
      "close_l119 -> close_l120 : 1029.0\n",
      "volume_l119 -> volume_l120 : 309110.0\n",
      "year_l120 -> year_l121 : 2024.0\n",
      "month_l120 -> month_l121 : 6.0\n",
      "day_l120 -> day_l121 : 19.0\n",
      "dayofweek_l120 -> dayofweek_l121 : 2.0\n",
      "hour_l120 -> hour_l121 : 13.0\n",
      "open_l120 -> open_l121 : 1047.2\n",
      "low_l120 -> low_l121 : 1037.0\n",
      "high_l120 -> high_l121 : 1048.2\n",
      "close_l120 -> close_l121 : 1042.0\n",
      "volume_l120 -> volume_l121 : 163723.0\n",
      "year_l121 -> year_l122 : 2024.0\n",
      "month_l121 -> month_l122 : 6.0\n",
      "day_l121 -> day_l122 : 19.0\n",
      "dayofweek_l121 -> dayofweek_l122 : 2.0\n",
      "hour_l121 -> hour_l122 : 12.0\n",
      "open_l121 -> open_l122 : 1038.6\n",
      "low_l121 -> low_l122 : 1037.0\n",
      "high_l121 -> high_l122 : 1048.2\n",
      "close_l121 -> close_l122 : 1047.0\n",
      "volume_l121 -> volume_l122 : 176420.0\n",
      "year_l122 -> year_l123 : 2024.0\n",
      "month_l122 -> month_l123 : 6.0\n",
      "day_l122 -> day_l123 : 19.0\n",
      "dayofweek_l122 -> dayofweek_l123 : 2.0\n",
      "hour_l122 -> hour_l123 : 11.0\n",
      "open_l122 -> open_l123 : 1032.6\n",
      "low_l122 -> low_l123 : 1027.0\n",
      "high_l122 -> high_l123 : 1041.4\n",
      "close_l122 -> close_l123 : 1038.0\n",
      "volume_l122 -> volume_l123 : 192405.0\n",
      "year_l123 -> year_l124 : 2024.0\n",
      "month_l123 -> month_l124 : 6.0\n",
      "day_l123 -> day_l124 : 19.0\n",
      "dayofweek_l123 -> dayofweek_l124 : 2.0\n",
      "hour_l123 -> hour_l124 : 10.0\n",
      "open_l123 -> open_l124 : 1035.8\n",
      "low_l123 -> low_l124 : 1032.0\n",
      "high_l123 -> high_l124 : 1044.2\n",
      "close_l123 -> close_l124 : 1032.0\n",
      "volume_l123 -> volume_l124 : 115143.0\n",
      "year_l124 -> year_l125 : 2024.0\n",
      "month_l124 -> month_l125 : 6.0\n",
      "day_l124 -> day_l125 : 19.0\n",
      "dayofweek_l124 -> dayofweek_l125 : 2.0\n",
      "hour_l124 -> hour_l125 : 9.0\n",
      "open_l124 -> open_l125 : 1033.0\n",
      "low_l124 -> low_l125 : 1027.0\n",
      "high_l124 -> high_l125 : 1043.2\n",
      "close_l124 -> close_l125 : 1035.0\n",
      "volume_l124 -> volume_l125 : 211012.0\n",
      "year_l125 -> year_l126 : 2024.0\n",
      "month_l125 -> month_l126 : 6.0\n",
      "day_l125 -> day_l126 : 19.0\n",
      "dayofweek_l125 -> dayofweek_l126 : 2.0\n",
      "hour_l125 -> hour_l126 : 8.0\n",
      "open_l125 -> open_l126 : 1038.4\n",
      "low_l125 -> low_l126 : 1032.0\n",
      "high_l125 -> high_l126 : 1046.2\n",
      "close_l125 -> close_l126 : 1033.0\n",
      "volume_l125 -> volume_l126 : 294179.0\n",
      "year_l126 -> year_l127 : 2024.0\n",
      "month_l126 -> month_l127 : 6.0\n",
      "day_l126 -> day_l127 : 19.0\n",
      "dayofweek_l126 -> dayofweek_l127 : 2.0\n",
      "hour_l126 -> hour_l127 : 7.0\n",
      "open_l126 -> open_l127 : 1035.0\n",
      "low_l126 -> low_l127 : 1016.0\n",
      "high_l126 -> high_l127 : 1042.0\n",
      "close_l126 -> close_l127 : 1038.0\n",
      "volume_l126 -> volume_l127 : 462100.0\n",
      "year_l127 -> year_l128 : 2024.0\n",
      "month_l127 -> month_l128 : 6.0\n",
      "day_l127 -> day_l128 : 19.0\n",
      "dayofweek_l127 -> dayofweek_l128 : 2.0\n",
      "hour_l127 -> hour_l128 : 6.0\n",
      "open_l127 -> open_l128 : 1035.0\n",
      "low_l127 -> low_l128 : 1035.0\n",
      "high_l127 -> high_l128 : 1035.0\n",
      "close_l127 -> close_l128 : 1035.0\n",
      "volume_l127 -> volume_l128 : 621.0\n",
      "year_l128 -> year_l129 : 2024.0\n",
      "month_l128 -> month_l129 : 6.0\n",
      "day_l128 -> day_l129 : 18.0\n",
      "dayofweek_l128 -> dayofweek_l129 : 1.0\n",
      "hour_l128 -> hour_l129 : 20.0\n",
      "open_l128 -> open_l129 : 1030.8\n",
      "low_l128 -> low_l129 : 1030.0\n",
      "high_l128 -> high_l129 : 1034.8\n",
      "close_l128 -> close_l129 : 1033.0\n",
      "volume_l128 -> volume_l129 : 37792.0\n",
      "year_l129 -> year_l130 : 2024.0\n",
      "month_l129 -> month_l130 : 6.0\n",
      "day_l129 -> day_l130 : 18.0\n",
      "dayofweek_l129 -> dayofweek_l130 : 1.0\n",
      "hour_l129 -> hour_l130 : 19.0\n",
      "open_l129 -> open_l130 : 1038.6\n",
      "low_l129 -> low_l130 : 1030.0\n",
      "high_l129 -> high_l130 : 1039.2\n",
      "close_l129 -> close_l130 : 1030.0\n",
      "volume_l129 -> volume_l130 : 47532.0\n",
      "year_l130 -> year_l131 : 2024.0\n",
      "month_l130 -> month_l131 : 6.0\n",
      "day_l130 -> day_l131 : 18.0\n",
      "dayofweek_l130 -> dayofweek_l131 : 1.0\n",
      "hour_l130 -> hour_l131 : 18.0\n",
      "open_l130 -> open_l131 : 1034.6\n",
      "low_l130 -> low_l131 : 1034.0\n",
      "high_l130 -> high_l131 : 1043.0\n",
      "close_l130 -> close_l131 : 1038.0\n",
      "volume_l130 -> volume_l131 : 63530.0\n",
      "year_l131 -> year_l132 : 2024.0\n",
      "month_l131 -> month_l132 : 6.0\n",
      "day_l131 -> day_l132 : 18.0\n",
      "dayofweek_l131 -> dayofweek_l132 : 1.0\n",
      "hour_l131 -> hour_l132 : 17.0\n",
      "open_l131 -> open_l132 : 1034.8\n",
      "low_l131 -> low_l132 : 1033.0\n",
      "high_l131 -> high_l132 : 1039.4\n",
      "close_l131 -> close_l132 : 1034.0\n",
      "volume_l131 -> volume_l132 : 63153.0\n",
      "year_l132 -> year_l133 : 2024.0\n",
      "month_l132 -> month_l133 : 6.0\n",
      "day_l132 -> day_l133 : 18.0\n",
      "dayofweek_l132 -> dayofweek_l133 : 1.0\n",
      "hour_l132 -> hour_l133 : 16.0\n",
      "open_l132 -> open_l133 : 1037.0\n",
      "low_l132 -> low_l133 : 1026.0\n",
      "high_l132 -> high_l133 : 1037.4\n",
      "close_l132 -> close_l133 : 1034.0\n",
      "volume_l132 -> volume_l133 : 165732.0\n",
      "year_l133 -> year_l134 : 2024.0\n",
      "month_l133 -> month_l134 : 6.0\n",
      "day_l133 -> day_l134 : 18.0\n",
      "dayofweek_l133 -> dayofweek_l134 : 1.0\n",
      "hour_l133 -> hour_l134 : 15.0\n",
      "open_l133 -> open_l134 : 1036.0\n",
      "low_l133 -> low_l134 : 1032.0\n",
      "high_l133 -> high_l134 : 1040.0\n",
      "close_l133 -> close_l134 : 1037.0\n",
      "volume_l133 -> volume_l134 : 200197.0\n",
      "year_l134 -> year_l135 : 2024.0\n",
      "month_l134 -> month_l135 : 6.0\n",
      "day_l134 -> day_l135 : 18.0\n",
      "dayofweek_l134 -> dayofweek_l135 : 1.0\n",
      "hour_l134 -> hour_l135 : 14.0\n",
      "open_l134 -> open_l135 : 1048.4\n",
      "low_l134 -> low_l135 : 1035.0\n",
      "high_l134 -> high_l135 : 1049.6\n",
      "close_l134 -> close_l135 : 1036.0\n",
      "volume_l134 -> volume_l135 : 193851.0\n",
      "year_l135 -> year_l136 : 2024.0\n",
      "month_l135 -> month_l136 : 6.0\n",
      "day_l135 -> day_l136 : 18.0\n",
      "dayofweek_l135 -> dayofweek_l136 : 1.0\n",
      "hour_l135 -> hour_l136 : 13.0\n",
      "open_l135 -> open_l136 : 1041.2\n",
      "low_l135 -> low_l136 : 1039.0\n",
      "high_l135 -> high_l136 : 1050.0\n",
      "close_l135 -> close_l136 : 1048.0\n",
      "volume_l135 -> volume_l136 : 155039.0\n",
      "year_l136 -> year_l137 : 2024.0\n",
      "month_l136 -> month_l137 : 6.0\n",
      "day_l136 -> day_l137 : 18.0\n",
      "dayofweek_l136 -> dayofweek_l137 : 1.0\n",
      "hour_l136 -> hour_l137 : 12.0\n",
      "open_l136 -> open_l137 : 1046.0\n",
      "low_l136 -> low_l137 : 1033.0\n",
      "high_l136 -> high_l137 : 1049.0\n",
      "close_l136 -> close_l137 : 1041.0\n",
      "volume_l136 -> volume_l137 : 367392.0\n",
      "year_l137 -> year_l138 : 2024.0\n",
      "month_l137 -> month_l138 : 6.0\n",
      "day_l137 -> day_l138 : 18.0\n",
      "dayofweek_l137 -> dayofweek_l138 : 1.0\n",
      "hour_l137 -> hour_l138 : 11.0\n",
      "open_l137 -> open_l138 : 1055.6\n",
      "low_l137 -> low_l138 : 1044.0\n",
      "high_l137 -> high_l138 : 1057.6\n",
      "close_l137 -> close_l138 : 1046.0\n",
      "volume_l137 -> volume_l138 : 318101.0\n",
      "year_l138 -> year_l139 : 2024.0\n",
      "month_l138 -> month_l139 : 6.0\n",
      "day_l138 -> day_l139 : 18.0\n",
      "dayofweek_l138 -> dayofweek_l139 : 1.0\n",
      "hour_l138 -> hour_l139 : 10.0\n",
      "open_l138 -> open_l139 : 1057.0\n",
      "low_l138 -> low_l139 : 1055.0\n",
      "high_l138 -> high_l139 : 1060.8\n",
      "close_l138 -> close_l139 : 1056.0\n",
      "volume_l138 -> volume_l139 : 82407.0\n",
      "year_l139 -> year_l140 : 2024.0\n",
      "month_l139 -> month_l140 : 6.0\n",
      "day_l139 -> day_l140 : 18.0\n",
      "dayofweek_l139 -> dayofweek_l140 : 1.0\n",
      "hour_l139 -> hour_l140 : 9.0\n",
      "open_l139 -> open_l140 : 1057.8\n",
      "low_l139 -> low_l140 : 1055.0\n",
      "high_l139 -> high_l140 : 1058.6\n",
      "close_l139 -> close_l140 : 1056.0\n",
      "volume_l139 -> volume_l140 : 123469.0\n",
      "year_l140 -> year_l141 : 2024.0\n",
      "month_l140 -> month_l141 : 6.0\n",
      "day_l140 -> day_l141 : 18.0\n",
      "dayofweek_l140 -> dayofweek_l141 : 1.0\n",
      "hour_l140 -> hour_l141 : 8.0\n",
      "open_l140 -> open_l141 : 1064.6\n",
      "low_l140 -> low_l141 : 1055.0\n",
      "high_l140 -> high_l141 : 1064.8\n",
      "close_l140 -> close_l141 : 1057.0\n",
      "volume_l140 -> volume_l141 : 84209.0\n",
      "year_l141 -> year_l142 : 2024.0\n",
      "month_l141 -> month_l142 : 6.0\n",
      "day_l141 -> day_l142 : 18.0\n",
      "dayofweek_l141 -> dayofweek_l142 : 1.0\n",
      "hour_l141 -> hour_l142 : 7.0\n",
      "open_l141 -> open_l142 : 1064.0\n",
      "low_l141 -> low_l142 : 1054.0\n",
      "high_l141 -> high_l142 : 1067.8\n",
      "close_l141 -> close_l142 : 1064.0\n",
      "volume_l141 -> volume_l142 : 260354.0\n",
      "year_l142 -> year_l143 : 2024.0\n",
      "month_l142 -> month_l143 : 6.0\n",
      "day_l142 -> day_l143 : 18.0\n",
      "dayofweek_l142 -> dayofweek_l143 : 1.0\n",
      "hour_l142 -> hour_l143 : 6.0\n",
      "open_l142 -> open_l143 : 1064.8\n",
      "low_l142 -> low_l143 : 1064.0\n",
      "high_l142 -> high_l143 : 1064.8\n",
      "close_l142 -> close_l143 : 1064.0\n",
      "volume_l142 -> volume_l143 : 1591.0\n",
      "year_l143 -> year_l144 : 2024.0\n",
      "month_l143 -> month_l144 : 6.0\n",
      "day_l143 -> day_l144 : 17.0\n",
      "dayofweek_l143 -> dayofweek_l144 : 0.0\n",
      "hour_l143 -> hour_l144 : 20.0\n",
      "open_l143 -> open_l144 : 1065.2\n",
      "low_l143 -> low_l144 : 1063.0\n",
      "high_l143 -> high_l144 : 1066.0\n",
      "close_l143 -> close_l144 : 1065.0\n",
      "volume_l143 -> volume_l144 : 29357.0\n",
      "year_l144 -> year_l145 : 2024.0\n",
      "month_l144 -> month_l145 : 6.0\n",
      "day_l144 -> day_l145 : 17.0\n",
      "dayofweek_l144 -> dayofweek_l145 : 0.0\n",
      "hour_l144 -> hour_l145 : 19.0\n",
      "open_l144 -> open_l145 : 1060.8\n",
      "low_l144 -> low_l145 : 1059.0\n",
      "high_l144 -> high_l145 : 1066.6\n",
      "close_l144 -> close_l145 : 1064.0\n",
      "volume_l144 -> volume_l145 : 48952.0\n",
      "year_l145 -> year_l146 : 2024.0\n",
      "month_l145 -> month_l146 : 6.0\n",
      "day_l145 -> day_l146 : 17.0\n",
      "dayofweek_l145 -> dayofweek_l146 : 0.0\n",
      "hour_l145 -> hour_l146 : 18.0\n",
      "open_l145 -> open_l146 : 1061.0\n",
      "low_l145 -> low_l146 : 1060.0\n",
      "high_l145 -> high_l146 : 1064.2\n",
      "close_l145 -> close_l146 : 1060.0\n",
      "volume_l145 -> volume_l146 : 54370.0\n",
      "year_l146 -> year_l147 : 2024.0\n",
      "month_l146 -> month_l147 : 6.0\n",
      "day_l146 -> day_l147 : 17.0\n",
      "dayofweek_l146 -> dayofweek_l147 : 0.0\n",
      "hour_l146 -> hour_l147 : 17.0\n",
      "open_l146 -> open_l147 : 1056.4\n",
      "low_l146 -> low_l147 : 1056.0\n",
      "high_l146 -> high_l147 : 1062.2\n",
      "close_l146 -> close_l147 : 1061.0\n",
      "volume_l146 -> volume_l147 : 53840.0\n",
      "year_l147 -> year_l148 : 2024.0\n",
      "month_l147 -> month_l148 : 6.0\n",
      "day_l147 -> day_l148 : 17.0\n",
      "dayofweek_l147 -> dayofweek_l148 : 0.0\n",
      "hour_l147 -> hour_l148 : 16.0\n",
      "open_l147 -> open_l148 : 1056.8\n",
      "low_l147 -> low_l148 : 1054.0\n",
      "high_l147 -> high_l148 : 1061.2\n",
      "close_l147 -> close_l148 : 1056.0\n",
      "volume_l147 -> volume_l148 : 138862.0\n",
      "year_l148 -> year_l149 : 2024.0\n",
      "month_l148 -> month_l149 : 6.0\n",
      "day_l148 -> day_l149 : 17.0\n",
      "dayofweek_l148 -> dayofweek_l149 : 0.0\n",
      "hour_l148 -> hour_l149 : 15.0\n",
      "open_l148 -> open_l149 : 1066.8\n",
      "low_l148 -> low_l149 : 1053.0\n",
      "high_l148 -> high_l149 : 1066.8\n",
      "close_l148 -> close_l149 : 1057.0\n",
      "volume_l148 -> volume_l149 : 293338.0\n",
      "year_l149 -> year_l150 : 2024.0\n",
      "month_l149 -> month_l150 : 6.0\n",
      "day_l149 -> day_l150 : 17.0\n",
      "dayofweek_l149 -> dayofweek_l150 : 0.0\n",
      "hour_l149 -> hour_l150 : 14.0\n",
      "open_l149 -> open_l150 : 1063.8\n",
      "low_l149 -> low_l150 : 1062.0\n",
      "high_l149 -> high_l150 : 1068.0\n",
      "close_l149 -> close_l150 : 1066.0\n",
      "volume_l149 -> volume_l150 : 144530.0\n",
      "year_l150 -> year_l151 : 2024.0\n",
      "month_l150 -> month_l151 : 6.0\n",
      "day_l150 -> day_l151 : 17.0\n",
      "dayofweek_l150 -> dayofweek_l151 : 0.0\n",
      "hour_l150 -> hour_l151 : 13.0\n",
      "open_l150 -> open_l151 : 1064.0\n",
      "low_l150 -> low_l151 : 1062.0\n",
      "high_l150 -> high_l151 : 1067.0\n",
      "close_l150 -> close_l151 : 1063.0\n",
      "volume_l150 -> volume_l151 : 202812.0\n",
      "year_l151 -> year_l152 : 2024.0\n",
      "month_l151 -> month_l152 : 6.0\n",
      "day_l151 -> day_l152 : 17.0\n",
      "dayofweek_l151 -> dayofweek_l152 : 0.0\n",
      "hour_l151 -> hour_l152 : 12.0\n",
      "open_l151 -> open_l152 : 1071.0\n",
      "low_l151 -> low_l152 : 1062.0\n",
      "high_l151 -> high_l152 : 1072.6\n",
      "close_l151 -> close_l152 : 1064.0\n",
      "volume_l151 -> volume_l152 : 300313.0\n",
      "year_l152 -> year_l153 : 2024.0\n",
      "month_l152 -> month_l153 : 6.0\n",
      "day_l152 -> day_l153 : 17.0\n",
      "dayofweek_l152 -> dayofweek_l153 : 0.0\n",
      "hour_l152 -> hour_l153 : 11.0\n",
      "open_l152 -> open_l153 : 1078.6\n",
      "low_l152 -> low_l153 : 1069.0\n",
      "high_l152 -> high_l153 : 1078.8\n",
      "close_l152 -> close_l153 : 1071.0\n",
      "volume_l152 -> volume_l153 : 207825.0\n",
      "year_l153 -> year_l154 : 2024.0\n",
      "month_l153 -> month_l154 : 6.0\n",
      "day_l153 -> day_l154 : 17.0\n",
      "dayofweek_l153 -> dayofweek_l154 : 0.0\n",
      "hour_l153 -> hour_l154 : 10.0\n",
      "open_l153 -> open_l154 : 1074.8\n",
      "low_l153 -> low_l154 : 1074.0\n",
      "high_l153 -> high_l154 : 1078.8\n",
      "close_l153 -> close_l154 : 1078.0\n",
      "volume_l153 -> volume_l154 : 165053.0\n",
      "year_l154 -> year_l155 : 2024.0\n",
      "month_l154 -> month_l155 : 6.0\n",
      "day_l154 -> day_l155 : 17.0\n",
      "dayofweek_l154 -> dayofweek_l155 : 0.0\n",
      "hour_l154 -> hour_l155 : 9.0\n",
      "open_l154 -> open_l155 : 1073.4\n",
      "low_l154 -> low_l155 : 1069.0\n",
      "high_l154 -> high_l155 : 1075.2\n",
      "close_l154 -> close_l155 : 1074.0\n",
      "volume_l154 -> volume_l155 : 369998.0\n",
      "year_l155 -> year_l156 : 2024.0\n",
      "month_l155 -> month_l156 : 6.0\n",
      "day_l155 -> day_l156 : 17.0\n",
      "dayofweek_l155 -> dayofweek_l156 : 0.0\n",
      "hour_l155 -> hour_l156 : 8.0\n",
      "open_l155 -> open_l156 : 1081.8\n",
      "low_l155 -> low_l156 : 1070.0\n",
      "high_l155 -> high_l156 : 1085.6\n",
      "close_l155 -> close_l156 : 1073.0\n",
      "volume_l155 -> volume_l156 : 447497.0\n",
      "year_l156 -> year_l157 : 2024.0\n",
      "month_l156 -> month_l157 : 6.0\n",
      "day_l156 -> day_l157 : 17.0\n",
      "dayofweek_l156 -> dayofweek_l157 : 0.0\n",
      "hour_l156 -> hour_l157 : 7.0\n",
      "open_l156 -> open_l157 : 1088.0\n",
      "low_l156 -> low_l157 : 1077.0\n",
      "high_l156 -> high_l157 : 1099.0\n",
      "close_l156 -> close_l157 : 1081.0\n",
      "volume_l156 -> volume_l157 : 850195.0\n",
      "year_l157 -> year_l158 : 2024.0\n",
      "month_l157 -> month_l158 : 6.0\n",
      "day_l157 -> day_l158 : 17.0\n",
      "dayofweek_l157 -> dayofweek_l158 : 0.0\n",
      "hour_l157 -> hour_l158 : 6.0\n",
      "open_l157 -> open_l158 : 1088.0\n",
      "low_l157 -> low_l158 : 1088.0\n",
      "high_l157 -> high_l158 : 1088.0\n",
      "close_l157 -> close_l158 : 1088.0\n",
      "volume_l157 -> volume_l158 : 14008.0\n",
      "year_l158 -> year_l159 : 2024.0\n",
      "month_l158 -> month_l159 : 6.0\n",
      "day_l158 -> day_l159 : 16.0\n",
      "dayofweek_l158 -> dayofweek_l159 : 6.0\n",
      "hour_l158 -> hour_l159 : 20.0\n",
      "open_l158 -> open_l159 : 1092.4\n",
      "low_l158 -> low_l159 : 1091.0\n",
      "high_l158 -> high_l159 : 1092.6\n",
      "close_l158 -> close_l159 : 1092.0\n",
      "volume_l158 -> volume_l159 : 4574.0\n",
      "year_l159 -> year_l160 : 2024.0\n",
      "month_l159 -> month_l160 : 6.0\n",
      "day_l159 -> day_l160 : 16.0\n",
      "dayofweek_l159 -> dayofweek_l160 : 6.0\n",
      "hour_l159 -> hour_l160 : 19.0\n",
      "open_l159 -> open_l160 : 1092.0\n",
      "low_l159 -> low_l160 : 1091.0\n",
      "high_l159 -> high_l160 : 1092.6\n",
      "close_l159 -> close_l160 : 1092.0\n",
      "volume_l159 -> volume_l160 : 1560.0\n",
      "year_l160 -> year_l161 : 2024.0\n",
      "month_l160 -> month_l161 : 6.0\n",
      "day_l160 -> day_l161 : 16.0\n",
      "dayofweek_l160 -> dayofweek_l161 : 6.0\n",
      "hour_l160 -> hour_l161 : 18.0\n",
      "open_l160 -> open_l161 : 1093.8\n",
      "low_l160 -> low_l161 : 1091.0\n",
      "high_l160 -> high_l161 : 1093.8\n",
      "close_l160 -> close_l161 : 1092.0\n",
      "volume_l160 -> volume_l161 : 5094.0\n",
      "year_l161 -> year_l162 : 2024.0\n",
      "month_l161 -> month_l162 : 6.0\n",
      "day_l161 -> day_l162 : 16.0\n",
      "dayofweek_l161 -> dayofweek_l162 : 6.0\n",
      "hour_l161 -> hour_l162 : 17.0\n",
      "open_l161 -> open_l162 : 1093.6\n",
      "low_l161 -> low_l162 : 1092.0\n",
      "high_l161 -> high_l162 : 1094.0\n",
      "close_l161 -> close_l162 : 1093.0\n",
      "volume_l161 -> volume_l162 : 2156.0\n",
      "year_l162 -> year_l163 : 2024.0\n",
      "month_l162 -> month_l163 : 6.0\n",
      "day_l162 -> day_l163 : 16.0\n",
      "dayofweek_l162 -> dayofweek_l163 : 6.0\n",
      "hour_l162 -> hour_l163 : 16.0\n",
      "open_l162 -> open_l163 : 1093.6\n",
      "low_l162 -> low_l163 : 1091.0\n",
      "high_l162 -> high_l163 : 1094.4\n",
      "close_l162 -> close_l163 : 1091.0\n",
      "volume_l162 -> volume_l163 : 5932.0\n",
      "year_l163 -> year_l164 : 2024.0\n",
      "month_l163 -> month_l164 : 6.0\n",
      "day_l163 -> day_l164 : 16.0\n",
      "dayofweek_l163 -> dayofweek_l164 : 6.0\n",
      "hour_l163 -> hour_l164 : 15.0\n",
      "open_l163 -> open_l164 : 1093.2\n",
      "low_l163 -> low_l164 : 1092.0\n",
      "high_l163 -> high_l164 : 1094.0\n",
      "close_l163 -> close_l164 : 1093.0\n",
      "volume_l163 -> volume_l164 : 3952.0\n",
      "year_l164 -> year_l165 : 2024.0\n",
      "month_l164 -> month_l165 : 6.0\n",
      "day_l164 -> day_l165 : 16.0\n",
      "dayofweek_l164 -> dayofweek_l165 : 6.0\n",
      "hour_l164 -> hour_l165 : 14.0\n",
      "open_l164 -> open_l165 : 1094.0\n",
      "low_l164 -> low_l165 : 1092.0\n",
      "high_l164 -> high_l165 : 1094.4\n",
      "close_l164 -> close_l165 : 1092.0\n",
      "volume_l164 -> volume_l165 : 1494.0\n",
      "year_l165 -> year_l166 : 2024.0\n",
      "month_l165 -> month_l166 : 6.0\n",
      "day_l165 -> day_l166 : 16.0\n",
      "dayofweek_l165 -> dayofweek_l166 : 6.0\n",
      "hour_l165 -> hour_l166 : 13.0\n",
      "open_l165 -> open_l166 : 1091.4\n",
      "low_l165 -> low_l166 : 1091.0\n",
      "high_l165 -> high_l166 : 1095.6\n",
      "close_l165 -> close_l166 : 1092.0\n",
      "volume_l165 -> volume_l166 : 6519.0\n",
      "year_l166 -> year_l167 : 2024.0\n",
      "month_l166 -> month_l167 : 6.0\n",
      "day_l166 -> day_l167 : 16.0\n",
      "dayofweek_l166 -> dayofweek_l167 : 6.0\n",
      "hour_l166 -> hour_l167 : 12.0\n",
      "open_l166 -> open_l167 : 1092.2\n",
      "low_l166 -> low_l167 : 1091.0\n",
      "high_l166 -> high_l167 : 1093.0\n",
      "close_l166 -> close_l167 : 1091.0\n",
      "volume_l166 -> volume_l167 : 3474.0\n",
      "year_l167 -> year_l168 : 2024.0\n",
      "month_l167 -> month_l168 : 6.0\n",
      "day_l167 -> day_l168 : 16.0\n",
      "dayofweek_l167 -> dayofweek_l168 : 6.0\n",
      "hour_l167 -> hour_l168 : 11.0\n",
      "open_l167 -> open_l168 : 1092.0\n",
      "low_l167 -> low_l168 : 1091.0\n",
      "high_l167 -> high_l168 : 1093.2\n",
      "close_l167 -> close_l168 : 1093.0\n",
      "volume_l167 -> volume_l168 : 7744.0\n",
      "year_l168 -> year_l169 : 2024.0\n",
      "month_l168 -> month_l169 : 6.0\n",
      "day_l168 -> day_l169 : 16.0\n",
      "dayofweek_l168 -> dayofweek_l169 : 6.0\n",
      "hour_l168 -> hour_l169 : 10.0\n",
      "open_l168 -> open_l169 : 1091.0\n",
      "low_l168 -> low_l169 : 1090.0\n",
      "high_l168 -> high_l169 : 1092.0\n",
      "close_l168 -> close_l169 : 1091.0\n",
      "volume_l168 -> volume_l169 : 3252.0\n",
      "year_l169 -> year_l170 : 2024.0\n",
      "month_l169 -> month_l170 : 6.0\n",
      "day_l169 -> day_l170 : 16.0\n",
      "dayofweek_l169 -> dayofweek_l170 : 6.0\n",
      "hour_l169 -> hour_l170 : 9.0\n",
      "open_l169 -> open_l170 : 1091.4\n",
      "low_l169 -> low_l170 : 1090.0\n",
      "high_l169 -> high_l170 : 1092.0\n",
      "close_l169 -> close_l170 : 1092.0\n",
      "volume_l169 -> volume_l170 : 3004.0\n",
      "year_l170 -> year_l171 : 2024.0\n",
      "month_l170 -> month_l171 : 6.0\n",
      "day_l170 -> day_l171 : 16.0\n",
      "dayofweek_l170 -> dayofweek_l171 : 6.0\n",
      "hour_l170 -> hour_l171 : 8.0\n",
      "open_l170 -> open_l171 : 1091.2\n",
      "low_l170 -> low_l171 : 1089.0\n",
      "high_l170 -> high_l171 : 1091.6\n",
      "close_l170 -> close_l171 : 1091.0\n",
      "volume_l170 -> volume_l171 : 4896.0\n",
      "year_l171 -> year_l172 : 2024.0\n",
      "month_l171 -> month_l172 : 6.0\n",
      "day_l171 -> day_l172 : 16.0\n",
      "dayofweek_l171 -> dayofweek_l172 : 6.0\n",
      "hour_l171 -> hour_l172 : 7.0\n",
      "open_l171 -> open_l172 : 1088.6\n",
      "low_l171 -> low_l172 : 1088.0\n",
      "high_l171 -> high_l172 : 1092.2\n",
      "close_l171 -> close_l172 : 1090.0\n",
      "volume_l171 -> volume_l172 : 8306.0\n",
      "year_l172 -> year_l173 : 2024.0\n",
      "month_l172 -> month_l173 : 6.0\n",
      "day_l172 -> day_l173 : 15.0\n",
      "dayofweek_l172 -> dayofweek_l173 : 5.0\n",
      "hour_l172 -> hour_l173 : 20.0\n",
      "open_l172 -> open_l173 : 1090.8\n",
      "low_l172 -> low_l173 : 1089.0\n",
      "high_l172 -> high_l173 : 1091.0\n",
      "close_l172 -> close_l173 : 1090.0\n",
      "volume_l172 -> volume_l173 : 2212.0\n",
      "year_l173 -> year_l174 : 2024.0\n",
      "month_l173 -> month_l174 : 6.0\n",
      "day_l173 -> day_l174 : 15.0\n",
      "dayofweek_l173 -> dayofweek_l174 : 5.0\n",
      "hour_l173 -> hour_l174 : 19.0\n",
      "open_l173 -> open_l174 : 1090.8\n",
      "low_l173 -> low_l174 : 1088.0\n",
      "high_l173 -> high_l174 : 1091.0\n",
      "close_l173 -> close_l174 : 1090.0\n",
      "volume_l173 -> volume_l174 : 2814.0\n",
      "year_l174 -> year_l175 : 2024.0\n",
      "month_l174 -> month_l175 : 6.0\n",
      "day_l174 -> day_l175 : 15.0\n",
      "dayofweek_l174 -> dayofweek_l175 : 5.0\n",
      "hour_l174 -> hour_l175 : 18.0\n",
      "open_l174 -> open_l175 : 1090.8\n",
      "low_l174 -> low_l175 : 1088.0\n",
      "high_l174 -> high_l175 : 1091.0\n",
      "close_l174 -> close_l175 : 1090.0\n",
      "volume_l174 -> volume_l175 : 2404.0\n",
      "year_l175 -> year_l176 : 2024.0\n",
      "month_l175 -> month_l176 : 6.0\n",
      "day_l175 -> day_l176 : 15.0\n",
      "dayofweek_l175 -> dayofweek_l176 : 5.0\n",
      "hour_l175 -> hour_l176 : 17.0\n",
      "open_l175 -> open_l176 : 1091.2\n",
      "low_l175 -> low_l176 : 1089.0\n",
      "high_l175 -> high_l176 : 1091.4\n",
      "close_l175 -> close_l176 : 1090.0\n",
      "volume_l175 -> volume_l176 : 1778.0\n",
      "year_l176 -> year_l177 : 2024.0\n",
      "month_l176 -> month_l177 : 6.0\n",
      "day_l176 -> day_l177 : 15.0\n",
      "dayofweek_l176 -> dayofweek_l177 : 5.0\n",
      "hour_l176 -> hour_l177 : 16.0\n",
      "open_l176 -> open_l177 : 1091.6\n",
      "low_l176 -> low_l177 : 1090.0\n",
      "high_l176 -> high_l177 : 1091.6\n",
      "close_l176 -> close_l177 : 1091.0\n",
      "volume_l176 -> volume_l177 : 2894.0\n",
      "year_l177 -> year_l178 : 2024.0\n",
      "month_l177 -> month_l178 : 6.0\n",
      "day_l177 -> day_l178 : 15.0\n",
      "dayofweek_l177 -> dayofweek_l178 : 5.0\n",
      "hour_l177 -> hour_l178 : 15.0\n",
      "open_l177 -> open_l178 : 1092.2\n",
      "low_l177 -> low_l178 : 1087.0\n",
      "high_l177 -> high_l178 : 1092.2\n",
      "close_l177 -> close_l178 : 1091.0\n",
      "volume_l177 -> volume_l178 : 15786.0\n",
      "year_l178 -> year_l179 : 2024.0\n",
      "month_l178 -> month_l179 : 6.0\n",
      "day_l178 -> day_l179 : 15.0\n",
      "dayofweek_l178 -> dayofweek_l179 : 5.0\n",
      "hour_l178 -> hour_l179 : 14.0\n",
      "open_l178 -> open_l179 : 1091.4\n",
      "low_l178 -> low_l179 : 1090.0\n",
      "high_l178 -> high_l179 : 1092.2\n",
      "close_l178 -> close_l179 : 1092.0\n",
      "volume_l178 -> volume_l179 : 3900.0\n",
      "year_l179 -> year_l180 : 2024.0\n",
      "month_l179 -> month_l180 : 6.0\n",
      "day_l179 -> day_l180 : 15.0\n",
      "dayofweek_l179 -> dayofweek_l180 : 5.0\n",
      "hour_l179 -> hour_l180 : 13.0\n",
      "open_l179 -> open_l180 : 1091.4\n",
      "low_l179 -> low_l180 : 1089.0\n",
      "high_l179 -> high_l180 : 1092.2\n",
      "close_l179 -> close_l180 : 1091.0\n",
      "volume_l179 -> volume_l180 : 7390.0\n",
      "year_l180 -> year_l181 : 2024.0\n",
      "month_l180 -> month_l181 : 6.0\n",
      "day_l180 -> day_l181 : 15.0\n",
      "dayofweek_l180 -> dayofweek_l181 : 5.0\n",
      "hour_l180 -> hour_l181 : 12.0\n",
      "open_l180 -> open_l181 : 1091.6\n",
      "low_l180 -> low_l181 : 1090.0\n",
      "high_l180 -> high_l181 : 1092.2\n",
      "close_l180 -> close_l181 : 1091.0\n",
      "volume_l180 -> volume_l181 : 3666.0\n",
      "year_l181 -> year_l182 : 2024.0\n",
      "month_l181 -> month_l182 : 6.0\n",
      "day_l181 -> day_l182 : 15.0\n",
      "dayofweek_l181 -> dayofweek_l182 : 5.0\n",
      "hour_l181 -> hour_l182 : 11.0\n",
      "open_l181 -> open_l182 : 1089.0\n",
      "low_l181 -> low_l182 : 1088.0\n",
      "high_l181 -> high_l182 : 1092.0\n",
      "close_l181 -> close_l182 : 1091.0\n",
      "volume_l181 -> volume_l182 : 7414.0\n",
      "year_l182 -> year_l183 : 2024.0\n",
      "month_l182 -> month_l183 : 6.0\n",
      "day_l182 -> day_l183 : 15.0\n",
      "dayofweek_l182 -> dayofweek_l183 : 5.0\n",
      "hour_l182 -> hour_l183 : 10.0\n",
      "open_l182 -> open_l183 : 1088.6\n",
      "low_l182 -> low_l183 : 1087.0\n",
      "high_l182 -> high_l183 : 1090.0\n",
      "close_l182 -> close_l183 : 1088.0\n",
      "volume_l182 -> volume_l183 : 7676.0\n",
      "year_l183 -> year_l184 : 2024.0\n",
      "month_l183 -> month_l184 : 6.0\n",
      "day_l183 -> day_l184 : 15.0\n",
      "dayofweek_l183 -> dayofweek_l184 : 5.0\n",
      "hour_l183 -> hour_l184 : 9.0\n",
      "open_l183 -> open_l184 : 1092.2\n",
      "low_l183 -> low_l184 : 1085.0\n",
      "high_l183 -> high_l184 : 1092.2\n",
      "close_l183 -> close_l184 : 1087.0\n",
      "volume_l183 -> volume_l184 : 13738.0\n",
      "year_l184 -> year_l185 : 2024.0\n",
      "month_l184 -> month_l185 : 6.0\n",
      "day_l184 -> day_l185 : 15.0\n",
      "dayofweek_l184 -> dayofweek_l185 : 5.0\n",
      "hour_l184 -> hour_l185 : 8.0\n",
      "open_l184 -> open_l185 : 1092.2\n",
      "low_l184 -> low_l185 : 1089.0\n",
      "high_l184 -> high_l185 : 1092.6\n",
      "close_l184 -> close_l185 : 1092.0\n",
      "volume_l184 -> volume_l185 : 15910.0\n",
      "year_l185 -> year_l186 : 2024.0\n",
      "month_l185 -> month_l186 : 6.0\n",
      "day_l185 -> day_l186 : 15.0\n",
      "dayofweek_l185 -> dayofweek_l186 : 5.0\n",
      "hour_l185 -> hour_l186 : 7.0\n",
      "open_l185 -> open_l186 : 1094.0\n",
      "low_l185 -> low_l186 : 1082.0\n",
      "high_l185 -> high_l186 : 1094.4\n",
      "close_l185 -> close_l186 : 1092.0\n",
      "volume_l185 -> volume_l186 : 23286.0\n",
      "year_l186 -> year_l187 : 2024.0\n",
      "month_l186 -> month_l187 : 6.0\n",
      "day_l186 -> day_l187 : 14.0\n",
      "dayofweek_l186 -> dayofweek_l187 : 4.0\n",
      "hour_l186 -> hour_l187 : 20.0\n",
      "open_l186 -> open_l187 : 1085.6\n",
      "low_l186 -> low_l187 : 1083.0\n",
      "high_l186 -> high_l187 : 1090.0\n",
      "close_l186 -> close_l187 : 1089.0\n",
      "volume_l186 -> volume_l187 : 163560.0\n",
      "year_l187 -> year_l188 : 2024.0\n",
      "month_l187 -> month_l188 : 6.0\n",
      "day_l187 -> day_l188 : 14.0\n",
      "dayofweek_l187 -> dayofweek_l188 : 4.0\n",
      "hour_l187 -> hour_l188 : 19.0\n",
      "open_l187 -> open_l188 : 1073.6\n",
      "low_l187 -> low_l188 : 1073.0\n",
      "high_l187 -> high_l188 : 1086.6\n",
      "close_l187 -> close_l188 : 1086.0\n",
      "volume_l187 -> volume_l188 : 173849.0\n",
      "year_l188 -> year_l189 : 2024.0\n",
      "month_l188 -> month_l189 : 6.0\n",
      "day_l188 -> day_l189 : 14.0\n",
      "dayofweek_l188 -> dayofweek_l189 : 4.0\n",
      "hour_l188 -> hour_l189 : 18.0\n",
      "open_l188 -> open_l189 : 1070.0\n",
      "low_l188 -> low_l189 : 1068.0\n",
      "high_l188 -> high_l189 : 1077.4\n",
      "close_l188 -> close_l189 : 1073.0\n",
      "volume_l188 -> volume_l189 : 60518.0\n",
      "year_l189 -> year_l190 : 2024.0\n",
      "month_l189 -> month_l190 : 6.0\n",
      "day_l189 -> day_l190 : 14.0\n",
      "dayofweek_l189 -> dayofweek_l190 : 4.0\n",
      "hour_l189 -> hour_l190 : 17.0\n",
      "open_l189 -> open_l190 : 1072.0\n",
      "low_l189 -> low_l190 : 1068.0\n",
      "high_l189 -> high_l190 : 1072.6\n",
      "close_l189 -> close_l190 : 1070.0\n",
      "volume_l189 -> volume_l190 : 59119.0\n",
      "year_l190 -> year_l191 : 2024.0\n",
      "month_l190 -> month_l191 : 6.0\n",
      "day_l190 -> day_l191 : 14.0\n",
      "dayofweek_l190 -> dayofweek_l191 : 4.0\n",
      "hour_l190 -> hour_l191 : 16.0\n",
      "open_l190 -> open_l191 : 1072.0\n",
      "low_l190 -> low_l191 : 1070.0\n",
      "high_l190 -> high_l191 : 1075.8\n",
      "close_l190 -> close_l191 : 1072.0\n",
      "volume_l190 -> volume_l191 : 58399.0\n",
      "year_l191 -> year_l192 : 2024.0\n",
      "month_l191 -> month_l192 : 6.0\n",
      "day_l191 -> day_l192 : 14.0\n",
      "dayofweek_l191 -> dayofweek_l192 : 4.0\n",
      "hour_l191 -> hour_l192 : 15.0\n",
      "open_l191 -> open_l192 : 1071.6\n",
      "low_l191 -> low_l192 : 1069.0\n",
      "high_l191 -> high_l192 : 1076.8\n",
      "close_l191 -> close_l192 : 1072.0\n",
      "volume_l191 -> volume_l192 : 99540.0\n",
      "year_l192 -> year_l193 : 2024.0\n",
      "month_l192 -> month_l193 : 6.0\n",
      "day_l192 -> day_l193 : 14.0\n",
      "dayofweek_l192 -> dayofweek_l193 : 4.0\n",
      "hour_l192 -> hour_l193 : 14.0\n",
      "open_l192 -> open_l193 : 1077.4\n",
      "low_l192 -> low_l193 : 1068.0\n",
      "high_l192 -> high_l193 : 1077.6\n",
      "close_l192 -> close_l193 : 1072.0\n",
      "volume_l192 -> volume_l193 : 319981.0\n",
      "year_l193 -> year_l194 : 2024.0\n",
      "month_l193 -> month_l194 : 6.0\n",
      "day_l193 -> day_l194 : 14.0\n",
      "dayofweek_l193 -> dayofweek_l194 : 4.0\n",
      "hour_l193 -> hour_l194 : 13.0\n",
      "open_l193 -> open_l194 : 1072.0\n",
      "low_l193 -> low_l194 : 1071.0\n",
      "high_l193 -> high_l194 : 1078.8\n",
      "close_l193 -> close_l194 : 1077.0\n",
      "volume_l193 -> volume_l194 : 542470.0\n",
      "year_l194 -> year_l195 : 2024.0\n",
      "month_l194 -> month_l195 : 6.0\n",
      "day_l194 -> day_l195 : 14.0\n",
      "dayofweek_l194 -> dayofweek_l195 : 4.0\n",
      "hour_l194 -> hour_l195 : 12.0\n",
      "open_l194 -> open_l195 : 1071.4\n",
      "low_l194 -> low_l195 : 1066.0\n",
      "high_l194 -> high_l195 : 1074.0\n",
      "close_l194 -> close_l195 : 1072.0\n",
      "volume_l194 -> volume_l195 : 275569.0\n",
      "year_l195 -> year_l196 : 2024.0\n",
      "month_l195 -> month_l196 : 6.0\n",
      "day_l195 -> day_l196 : 14.0\n",
      "dayofweek_l195 -> dayofweek_l196 : 4.0\n",
      "hour_l195 -> hour_l196 : 11.0\n",
      "open_l195 -> open_l196 : 1067.6\n",
      "low_l195 -> low_l196 : 1065.0\n",
      "high_l195 -> high_l196 : 1074.0\n",
      "close_l195 -> close_l196 : 1071.0\n",
      "volume_l195 -> volume_l196 : 228266.0\n",
      "year_l196 -> year_l197 : 2024.0\n",
      "month_l196 -> month_l197 : 6.0\n",
      "day_l196 -> day_l197 : 14.0\n",
      "dayofweek_l196 -> dayofweek_l197 : 4.0\n",
      "hour_l196 -> hour_l197 : 10.0\n",
      "open_l196 -> open_l197 : 1059.8\n",
      "low_l196 -> low_l197 : 1058.0\n",
      "high_l196 -> high_l197 : 1068.0\n",
      "close_l196 -> close_l197 : 1067.0\n",
      "volume_l196 -> volume_l197 : 257162.0\n",
      "year_l197 -> year_l198 : 2024.0\n",
      "month_l197 -> month_l198 : 6.0\n",
      "day_l197 -> day_l198 : 14.0\n",
      "dayofweek_l197 -> dayofweek_l198 : 4.0\n",
      "hour_l197 -> hour_l198 : 9.0\n",
      "open_l197 -> open_l198 : 1059.0\n",
      "low_l197 -> low_l198 : 1055.0\n",
      "high_l197 -> high_l198 : 1060.0\n",
      "close_l197 -> close_l198 : 1059.0\n",
      "volume_l197 -> volume_l198 : 88206.0\n",
      "year_l198 -> year_l199 : 2024.0\n",
      "month_l198 -> month_l199 : 6.0\n",
      "day_l198 -> day_l199 : 14.0\n",
      "dayofweek_l198 -> dayofweek_l199 : 4.0\n",
      "hour_l198 -> hour_l199 : 8.0\n",
      "open_l198 -> open_l199 : 1059.0\n",
      "low_l198 -> low_l199 : 1055.0\n",
      "high_l198 -> high_l199 : 1064.0\n",
      "close_l198 -> close_l199 : 1059.0\n",
      "volume_l198 -> volume_l199 : 204432.0\n",
      "year_l199 -> year_l200 : 2024.0\n",
      "month_l199 -> month_l200 : 6.0\n",
      "day_l199 -> day_l200 : 14.0\n",
      "dayofweek_l199 -> dayofweek_l200 : 4.0\n",
      "hour_l199 -> hour_l200 : 7.0\n",
      "open_l199 -> open_l200 : 1050.0\n",
      "low_l199 -> low_l200 : 1044.0\n",
      "high_l199 -> high_l200 : 1064.4\n",
      "close_l199 -> close_l200 : 1058.0\n",
      "volume_l199 -> volume_l200 : 484532.0\n"
     ]
    }
   ],
   "source": [
    "last_row = df.tail(1).iloc[0]\n",
    "new_row = {}\n",
    "\n",
    "no_lag_dict = {'year': 'year_l1', 'month': 'month_l1', 'day': 'day_l1', 'hour': 'hour_l1', 'dayofweek': 'dayofweek_l1',\n",
    "               'open': 'open_l1', 'low': 'low_l1', 'high': 'high_l1', 'close': 'close_l1', 'volume': 'volume_l1'}\n",
    "    \n",
    "for key, value in last_row.items():\n",
    "    number = extract_number_from_key(key)\n",
    "    if number is None:\n",
    "        new_key = \"\"\n",
    "        if key in no_lag_dict:\n",
    "            new_key = no_lag_dict[key]                \n",
    "            \n",
    "        new_row[new_key] = value\n",
    "        print(f\"{key} -> {new_key} : {value}\")            \n",
    "    else: \n",
    "        next_number = int(number) + 1\n",
    "        if next_number <= max_lag:\n",
    "            new_key = key.replace(str(number), str(next_number))        \n",
    "            new_row[new_key] = value    \n",
    "            print(f\"{key} -> {new_key} : {value}\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "48d32fb3-3580-4dc7-9bb7-855da07a68b5",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'year_l1': 2024.0,\n",
       " 'month_l1': 6.0,\n",
       " 'day_l1': 27.0,\n",
       " 'dayofweek_l1': 3.0,\n",
       " 'hour_l1': 15.0,\n",
       " 'open_l1': 1050.6,\n",
       " 'low_l1': 1049.0,\n",
       " 'high_l1': 1051.4,\n",
       " 'close_l1': 1050.0,\n",
       " 'volume_l1': 15297.0,\n",
       " 'year_l2': 2024.0,\n",
       " 'month_l2': 6.0,\n",
       " 'day_l2': 27.0,\n",
       " 'dayofweek_l2': 3.0,\n",
       " 'hour_l2': 14.0,\n",
       " 'open_l2': 1051.2,\n",
       " 'low_l2': 1047.0,\n",
       " 'high_l2': 1051.4,\n",
       " 'close_l2': 1050.0,\n",
       " 'volume_l2': 51768.0,\n",
       " 'year_l3': 2024.0,\n",
       " 'month_l3': 6.0,\n",
       " 'day_l3': 27.0,\n",
       " 'dayofweek_l3': 3.0,\n",
       " 'hour_l3': 13.0,\n",
       " 'open_l3': 1053.4,\n",
       " 'low_l3': 1049.0,\n",
       " 'high_l3': 1054.0,\n",
       " 'close_l3': 1050.0,\n",
       " 'volume_l3': 72761.0,\n",
       " 'year_l4': 2024.0,\n",
       " 'month_l4': 6.0,\n",
       " 'day_l4': 27.0,\n",
       " 'dayofweek_l4': 3.0,\n",
       " 'hour_l4': 12.0,\n",
       " 'open_l4': 1050.2,\n",
       " 'low_l4': 1049.0,\n",
       " 'high_l4': 1054.0,\n",
       " 'close_l4': 1053.0,\n",
       " 'volume_l4': 60417.0,\n",
       " 'year_l5': 2024.0,\n",
       " 'month_l5': 6.0,\n",
       " 'day_l5': 27.0,\n",
       " 'dayofweek_l5': 3.0,\n",
       " 'hour_l5': 11.0,\n",
       " 'open_l5': 1053.6,\n",
       " 'low_l5': 1049.0,\n",
       " 'high_l5': 1053.6,\n",
       " 'close_l5': 1050.0,\n",
       " 'volume_l5': 48301.0,\n",
       " 'year_l6': 2024.0,\n",
       " 'month_l6': 6.0,\n",
       " 'day_l6': 27.0,\n",
       " 'dayofweek_l6': 3.0,\n",
       " 'hour_l6': 10.0,\n",
       " 'open_l6': 1047.0,\n",
       " 'low_l6': 1045.0,\n",
       " 'high_l6': 1054.6,\n",
       " 'close_l6': 1053.0,\n",
       " 'volume_l6': 112098.0,\n",
       " 'year_l7': 2024.0,\n",
       " 'month_l7': 6.0,\n",
       " 'day_l7': 27.0,\n",
       " 'dayofweek_l7': 3.0,\n",
       " 'hour_l7': 9.0,\n",
       " 'open_l7': 1048.2,\n",
       " 'low_l7': 1045.0,\n",
       " 'high_l7': 1049.2,\n",
       " 'close_l7': 1046.0,\n",
       " 'volume_l7': 54803.0,\n",
       " 'year_l8': 2024.0,\n",
       " 'month_l8': 6.0,\n",
       " 'day_l8': 27.0,\n",
       " 'dayofweek_l8': 3.0,\n",
       " 'hour_l8': 8.0,\n",
       " 'open_l8': 1049.2,\n",
       " 'low_l8': 1045.0,\n",
       " 'high_l8': 1051.8,\n",
       " 'close_l8': 1048.0,\n",
       " 'volume_l8': 90919.0,\n",
       " 'year_l9': 2024.0,\n",
       " 'month_l9': 6.0,\n",
       " 'day_l9': 27.0,\n",
       " 'dayofweek_l9': 3.0,\n",
       " 'hour_l9': 7.0,\n",
       " 'open_l9': 1059.0,\n",
       " 'low_l9': 1045.0,\n",
       " 'high_l9': 1060.0,\n",
       " 'close_l9': 1049.0,\n",
       " 'volume_l9': 267073.0,\n",
       " 'year_l10': 2024.0,\n",
       " 'month_l10': 6.0,\n",
       " 'day_l10': 27.0,\n",
       " 'dayofweek_l10': 3.0,\n",
       " 'hour_l10': 6.0,\n",
       " 'open_l10': 1059.0,\n",
       " 'low_l10': 1059.0,\n",
       " 'high_l10': 1059.0,\n",
       " 'close_l10': 1059.0,\n",
       " 'volume_l10': 586.0,\n",
       " 'year_l11': 2024.0,\n",
       " 'month_l11': 6.0,\n",
       " 'day_l11': 26.0,\n",
       " 'dayofweek_l11': 2.0,\n",
       " 'hour_l11': 20.0,\n",
       " 'open_l11': 1058.0,\n",
       " 'low_l11': 1056.0,\n",
       " 'high_l11': 1060.6,\n",
       " 'close_l11': 1056.0,\n",
       " 'volume_l11': 42198.0,\n",
       " 'year_l12': 2024.0,\n",
       " 'month_l12': 6.0,\n",
       " 'day_l12': 26.0,\n",
       " 'dayofweek_l12': 2.0,\n",
       " 'hour_l12': 19.0,\n",
       " 'open_l12': 1056.8,\n",
       " 'low_l12': 1055.0,\n",
       " 'high_l12': 1058.4,\n",
       " 'close_l12': 1058.0,\n",
       " 'volume_l12': 34731.0,\n",
       " 'year_l13': 2024.0,\n",
       " 'month_l13': 6.0,\n",
       " 'day_l13': 26.0,\n",
       " 'dayofweek_l13': 2.0,\n",
       " 'hour_l13': 18.0,\n",
       " 'open_l13': 1057.6,\n",
       " 'low_l13': 1056.0,\n",
       " 'high_l13': 1058.4,\n",
       " 'close_l13': 1057.0,\n",
       " 'volume_l13': 17130.0,\n",
       " 'year_l14': 2024.0,\n",
       " 'month_l14': 6.0,\n",
       " 'day_l14': 26.0,\n",
       " 'dayofweek_l14': 2.0,\n",
       " 'hour_l14': 17.0,\n",
       " 'open_l14': 1058.0,\n",
       " 'low_l14': 1056.0,\n",
       " 'high_l14': 1061.0,\n",
       " 'close_l14': 1057.0,\n",
       " 'volume_l14': 54108.0,\n",
       " 'year_l15': 2024.0,\n",
       " 'month_l15': 6.0,\n",
       " 'day_l15': 26.0,\n",
       " 'dayofweek_l15': 2.0,\n",
       " 'hour_l15': 16.0,\n",
       " 'open_l15': 1055.4,\n",
       " 'low_l15': 1053.0,\n",
       " 'high_l15': 1060.0,\n",
       " 'close_l15': 1057.0,\n",
       " 'volume_l15': 51783.0,\n",
       " 'year_l16': 2024.0,\n",
       " 'month_l16': 6.0,\n",
       " 'day_l16': 26.0,\n",
       " 'dayofweek_l16': 2.0,\n",
       " 'hour_l16': 15.0,\n",
       " 'open_l16': 1054.4,\n",
       " 'low_l16': 1052.0,\n",
       " 'high_l16': 1055.2,\n",
       " 'close_l16': 1054.0,\n",
       " 'volume_l16': 33242.0,\n",
       " 'year_l17': 2024.0,\n",
       " 'month_l17': 6.0,\n",
       " 'day_l17': 26.0,\n",
       " 'dayofweek_l17': 2.0,\n",
       " 'hour_l17': 14.0,\n",
       " 'open_l17': 1056.8,\n",
       " 'low_l17': 1052.0,\n",
       " 'high_l17': 1057.6,\n",
       " 'close_l17': 1054.0,\n",
       " 'volume_l17': 71442.0,\n",
       " 'year_l18': 2024.0,\n",
       " 'month_l18': 6.0,\n",
       " 'day_l18': 26.0,\n",
       " 'dayofweek_l18': 2.0,\n",
       " 'hour_l18': 13.0,\n",
       " 'open_l18': 1052.4,\n",
       " 'low_l18': 1050.0,\n",
       " 'high_l18': 1057.0,\n",
       " 'close_l18': 1056.0,\n",
       " 'volume_l18': 129478.0,\n",
       " 'year_l19': 2024.0,\n",
       " 'month_l19': 6.0,\n",
       " 'day_l19': 26.0,\n",
       " 'dayofweek_l19': 2.0,\n",
       " 'hour_l19': 12.0,\n",
       " 'open_l19': 1060.2,\n",
       " 'low_l19': 1051.0,\n",
       " 'high_l19': 1060.4,\n",
       " 'close_l19': 1052.0,\n",
       " 'volume_l19': 163604.0,\n",
       " 'year_l20': 2024.0,\n",
       " 'month_l20': 6.0,\n",
       " 'day_l20': 26.0,\n",
       " 'dayofweek_l20': 2.0,\n",
       " 'hour_l20': 11.0,\n",
       " 'open_l20': 1059.2,\n",
       " 'low_l20': 1058.0,\n",
       " 'high_l20': 1062.2,\n",
       " 'close_l20': 1060.0,\n",
       " 'volume_l20': 52335.0,\n",
       " 'year_l21': 2024.0,\n",
       " 'month_l21': 6.0,\n",
       " 'day_l21': 26.0,\n",
       " 'dayofweek_l21': 2.0,\n",
       " 'hour_l21': 10.0,\n",
       " 'open_l21': 1060.8,\n",
       " 'low_l21': 1058.0,\n",
       " 'high_l21': 1063.2,\n",
       " 'close_l21': 1059.0,\n",
       " 'volume_l21': 92274.0,\n",
       " 'year_l22': 2024.0,\n",
       " 'month_l22': 6.0,\n",
       " 'day_l22': 26.0,\n",
       " 'dayofweek_l22': 2.0,\n",
       " 'hour_l22': 9.0,\n",
       " 'open_l22': 1059.8,\n",
       " 'low_l22': 1052.0,\n",
       " 'high_l22': 1063.0,\n",
       " 'close_l22': 1060.0,\n",
       " 'volume_l22': 142640.0,\n",
       " 'year_l23': 2024.0,\n",
       " 'month_l23': 6.0,\n",
       " 'day_l23': 26.0,\n",
       " 'dayofweek_l23': 2.0,\n",
       " 'hour_l23': 8.0,\n",
       " 'open_l23': 1059.0,\n",
       " 'low_l23': 1058.0,\n",
       " 'high_l23': 1066.0,\n",
       " 'close_l23': 1059.0,\n",
       " 'volume_l23': 337018.0,\n",
       " 'year_l24': 2024.0,\n",
       " 'month_l24': 6.0,\n",
       " 'day_l24': 26.0,\n",
       " 'dayofweek_l24': 2.0,\n",
       " 'hour_l24': 7.0,\n",
       " 'open_l24': 1058.8,\n",
       " 'low_l24': 1055.0,\n",
       " 'high_l24': 1064.4,\n",
       " 'close_l24': 1058.0,\n",
       " 'volume_l24': 327481.0,\n",
       " 'year_l25': 2024.0,\n",
       " 'month_l25': 6.0,\n",
       " 'day_l25': 26.0,\n",
       " 'dayofweek_l25': 2.0,\n",
       " 'hour_l25': 6.0,\n",
       " 'open_l25': 1058.8,\n",
       " 'low_l25': 1058.0,\n",
       " 'high_l25': 1058.8,\n",
       " 'close_l25': 1058.0,\n",
       " 'volume_l25': 4928.0,\n",
       " 'year_l26': 2024.0,\n",
       " 'month_l26': 6.0,\n",
       " 'day_l26': 25.0,\n",
       " 'dayofweek_l26': 1.0,\n",
       " 'hour_l26': 20.0,\n",
       " 'open_l26': 1057.8,\n",
       " 'low_l26': 1055.0,\n",
       " 'high_l26': 1060.0,\n",
       " 'close_l26': 1056.0,\n",
       " 'volume_l26': 79928.0,\n",
       " 'year_l27': 2024.0,\n",
       " 'month_l27': 6.0,\n",
       " 'day_l27': 25.0,\n",
       " 'dayofweek_l27': 1.0,\n",
       " 'hour_l27': 19.0,\n",
       " 'open_l27': 1054.0,\n",
       " 'low_l27': 1052.0,\n",
       " 'high_l27': 1058.0,\n",
       " 'close_l27': 1058.0,\n",
       " 'volume_l27': 98588.0,\n",
       " 'year_l28': 2024.0,\n",
       " 'month_l28': 6.0,\n",
       " 'day_l28': 25.0,\n",
       " 'dayofweek_l28': 1.0,\n",
       " 'hour_l28': 18.0,\n",
       " 'open_l28': 1051.6,\n",
       " 'low_l28': 1050.0,\n",
       " 'high_l28': 1054.0,\n",
       " 'close_l28': 1054.0,\n",
       " 'volume_l28': 35132.0,\n",
       " 'year_l29': 2024.0,\n",
       " 'month_l29': 6.0,\n",
       " 'day_l29': 25.0,\n",
       " 'dayofweek_l29': 1.0,\n",
       " 'hour_l29': 17.0,\n",
       " 'open_l29': 1052.0,\n",
       " 'low_l29': 1051.0,\n",
       " 'high_l29': 1053.0,\n",
       " 'close_l29': 1051.0,\n",
       " 'volume_l29': 36527.0,\n",
       " 'year_l30': 2024.0,\n",
       " 'month_l30': 6.0,\n",
       " 'day_l30': 25.0,\n",
       " 'dayofweek_l30': 1.0,\n",
       " 'hour_l30': 16.0,\n",
       " 'open_l30': 1047.8,\n",
       " 'low_l30': 1047.0,\n",
       " 'high_l30': 1053.8,\n",
       " 'close_l30': 1052.0,\n",
       " 'volume_l30': 147438.0,\n",
       " 'year_l31': 2024.0,\n",
       " 'month_l31': 6.0,\n",
       " 'day_l31': 25.0,\n",
       " 'dayofweek_l31': 1.0,\n",
       " 'hour_l31': 15.0,\n",
       " 'open_l31': 1044.0,\n",
       " 'low_l31': 1043.0,\n",
       " 'high_l31': 1048.2,\n",
       " 'close_l31': 1046.0,\n",
       " 'volume_l31': 68239.0,\n",
       " 'year_l32': 2024.0,\n",
       " 'month_l32': 6.0,\n",
       " 'day_l32': 25.0,\n",
       " 'dayofweek_l32': 1.0,\n",
       " 'hour_l32': 14.0,\n",
       " 'open_l32': 1046.8,\n",
       " 'low_l32': 1041.0,\n",
       " 'high_l32': 1047.4,\n",
       " 'close_l32': 1044.0,\n",
       " 'volume_l32': 84493.0,\n",
       " 'year_l33': 2024.0,\n",
       " 'month_l33': 6.0,\n",
       " 'day_l33': 25.0,\n",
       " 'dayofweek_l33': 1.0,\n",
       " 'hour_l33': 13.0,\n",
       " 'open_l33': 1043.8,\n",
       " 'low_l33': 1043.0,\n",
       " 'high_l33': 1048.2,\n",
       " 'close_l33': 1046.0,\n",
       " 'volume_l33': 99854.0,\n",
       " 'year_l34': 2024.0,\n",
       " 'month_l34': 6.0,\n",
       " 'day_l34': 25.0,\n",
       " 'dayofweek_l34': 1.0,\n",
       " 'hour_l34': 12.0,\n",
       " 'open_l34': 1040.8,\n",
       " 'low_l34': 1040.0,\n",
       " 'high_l34': 1044.6,\n",
       " 'close_l34': 1043.0,\n",
       " 'volume_l34': 59981.0,\n",
       " 'year_l35': 2024.0,\n",
       " 'month_l35': 6.0,\n",
       " 'day_l35': 25.0,\n",
       " 'dayofweek_l35': 1.0,\n",
       " 'hour_l35': 11.0,\n",
       " 'open_l35': 1041.0,\n",
       " 'low_l35': 1040.0,\n",
       " 'high_l35': 1044.8,\n",
       " 'close_l35': 1041.0,\n",
       " 'volume_l35': 56203.0,\n",
       " 'year_l36': 2024.0,\n",
       " 'month_l36': 6.0,\n",
       " 'day_l36': 25.0,\n",
       " 'dayofweek_l36': 1.0,\n",
       " 'hour_l36': 10.0,\n",
       " 'open_l36': 1039.8,\n",
       " 'low_l36': 1039.0,\n",
       " 'high_l36': 1047.4,\n",
       " 'close_l36': 1041.0,\n",
       " 'volume_l36': 137384.0,\n",
       " 'year_l37': 2024.0,\n",
       " 'month_l37': 6.0,\n",
       " 'day_l37': 25.0,\n",
       " 'dayofweek_l37': 1.0,\n",
       " 'hour_l37': 9.0,\n",
       " 'open_l37': 1042.0,\n",
       " 'low_l37': 1039.0,\n",
       " 'high_l37': 1045.0,\n",
       " 'close_l37': 1039.0,\n",
       " 'volume_l37': 103715.0,\n",
       " 'year_l38': 2024.0,\n",
       " 'month_l38': 6.0,\n",
       " 'day_l38': 25.0,\n",
       " 'dayofweek_l38': 1.0,\n",
       " 'hour_l38': 8.0,\n",
       " 'open_l38': 1046.8,\n",
       " 'low_l38': 1041.0,\n",
       " 'high_l38': 1051.2,\n",
       " 'close_l38': 1042.0,\n",
       " 'volume_l38': 133532.0,\n",
       " 'year_l39': 2024.0,\n",
       " 'month_l39': 6.0,\n",
       " 'day_l39': 25.0,\n",
       " 'dayofweek_l39': 1.0,\n",
       " 'hour_l39': 7.0,\n",
       " 'open_l39': 1044.0,\n",
       " 'low_l39': 1040.0,\n",
       " 'high_l39': 1048.2,\n",
       " 'close_l39': 1046.0,\n",
       " 'volume_l39': 126664.0,\n",
       " 'year_l40': 2024.0,\n",
       " 'month_l40': 6.0,\n",
       " 'day_l40': 25.0,\n",
       " 'dayofweek_l40': 1.0,\n",
       " 'hour_l40': 6.0,\n",
       " 'open_l40': 1043.6,\n",
       " 'low_l40': 1043.0,\n",
       " 'high_l40': 1043.6,\n",
       " 'close_l40': 1043.0,\n",
       " 'volume_l40': 557.0,\n",
       " 'year_l41': 2024.0,\n",
       " 'month_l41': 6.0,\n",
       " 'day_l41': 24.0,\n",
       " 'dayofweek_l41': 0.0,\n",
       " 'hour_l41': 20.0,\n",
       " 'open_l41': 1044.6,\n",
       " 'low_l41': 1041.0,\n",
       " 'high_l41': 1044.6,\n",
       " 'close_l41': 1043.0,\n",
       " 'volume_l41': 16635.0,\n",
       " 'year_l42': 2024.0,\n",
       " 'month_l42': 6.0,\n",
       " 'day_l42': 24.0,\n",
       " 'dayofweek_l42': 0.0,\n",
       " 'hour_l42': 19.0,\n",
       " 'open_l42': 1044.4,\n",
       " 'low_l42': 1044.0,\n",
       " 'high_l42': 1045.6,\n",
       " 'close_l42': 1044.0,\n",
       " 'volume_l42': 23865.0,\n",
       " 'year_l43': 2024.0,\n",
       " 'month_l43': 6.0,\n",
       " 'day_l43': 24.0,\n",
       " 'dayofweek_l43': 0.0,\n",
       " 'hour_l43': 18.0,\n",
       " 'open_l43': 1045.0,\n",
       " 'low_l43': 1043.0,\n",
       " 'high_l43': 1045.2,\n",
       " 'close_l43': 1044.0,\n",
       " 'volume_l43': 9984.0,\n",
       " 'year_l44': 2024.0,\n",
       " 'month_l44': 6.0,\n",
       " 'day_l44': 24.0,\n",
       " 'dayofweek_l44': 0.0,\n",
       " 'hour_l44': 17.0,\n",
       " 'open_l44': 1043.0,\n",
       " 'low_l44': 1043.0,\n",
       " 'high_l44': 1048.0,\n",
       " 'close_l44': 1045.0,\n",
       " 'volume_l44': 67980.0,\n",
       " 'year_l45': 2024.0,\n",
       " 'month_l45': 6.0,\n",
       " 'day_l45': 24.0,\n",
       " 'dayofweek_l45': 0.0,\n",
       " 'hour_l45': 16.0,\n",
       " 'open_l45': 1040.8,\n",
       " 'low_l45': 1038.0,\n",
       " 'high_l45': 1044.0,\n",
       " 'close_l45': 1043.0,\n",
       " 'volume_l45': 40635.0,\n",
       " 'year_l46': 2024.0,\n",
       " 'month_l46': 6.0,\n",
       " 'day_l46': 24.0,\n",
       " 'dayofweek_l46': 0.0,\n",
       " 'hour_l46': 15.0,\n",
       " 'open_l46': 1044.0,\n",
       " 'low_l46': 1038.0,\n",
       " 'high_l46': 1044.0,\n",
       " 'close_l46': 1038.0,\n",
       " 'volume_l46': 62239.0,\n",
       " 'year_l47': 2024.0,\n",
       " 'month_l47': 6.0,\n",
       " 'day_l47': 24.0,\n",
       " 'dayofweek_l47': 0.0,\n",
       " 'hour_l47': 14.0,\n",
       " 'open_l47': 1044.2,\n",
       " 'low_l47': 1040.0,\n",
       " 'high_l47': 1044.8,\n",
       " 'close_l47': 1043.0,\n",
       " 'volume_l47': 73198.0,\n",
       " 'year_l48': 2024.0,\n",
       " 'month_l48': 6.0,\n",
       " 'day_l48': 24.0,\n",
       " 'dayofweek_l48': 0.0,\n",
       " 'hour_l48': 13.0,\n",
       " 'open_l48': 1042.0,\n",
       " 'low_l48': 1039.0,\n",
       " 'high_l48': 1044.4,\n",
       " 'close_l48': 1044.0,\n",
       " 'volume_l48': 78739.0,\n",
       " 'year_l49': 2024.0,\n",
       " 'month_l49': 6.0,\n",
       " 'day_l49': 24.0,\n",
       " 'dayofweek_l49': 0.0,\n",
       " 'hour_l49': 12.0,\n",
       " 'open_l49': 1049.4,\n",
       " 'low_l49': 1037.0,\n",
       " 'high_l49': 1049.6,\n",
       " 'close_l49': 1042.0,\n",
       " 'volume_l49': 253262.0,\n",
       " 'year_l50': 2024.0,\n",
       " 'month_l50': 6.0,\n",
       " 'day_l50': 24.0,\n",
       " 'dayofweek_l50': 0.0,\n",
       " 'hour_l50': 11.0,\n",
       " 'open_l50': 1048.6,\n",
       " 'low_l50': 1045.0,\n",
       " 'high_l50': 1057.4,\n",
       " 'close_l50': 1049.0,\n",
       " 'volume_l50': 171467.0,\n",
       " 'year_l51': 2024.0,\n",
       " 'month_l51': 6.0,\n",
       " 'day_l51': 24.0,\n",
       " 'dayofweek_l51': 0.0,\n",
       " 'hour_l51': 10.0,\n",
       " 'open_l51': 1046.0,\n",
       " 'low_l51': 1040.0,\n",
       " 'high_l51': 1050.0,\n",
       " 'close_l51': 1048.0,\n",
       " 'volume_l51': 127928.0,\n",
       " 'year_l52': 2024.0,\n",
       " 'month_l52': 6.0,\n",
       " 'day_l52': 24.0,\n",
       " 'dayofweek_l52': 0.0,\n",
       " 'hour_l52': 9.0,\n",
       " 'open_l52': 1046.2,\n",
       " 'low_l52': 1042.0,\n",
       " 'high_l52': 1050.0,\n",
       " 'close_l52': 1046.0,\n",
       " 'volume_l52': 142055.0,\n",
       " 'year_l53': 2024.0,\n",
       " 'month_l53': 6.0,\n",
       " 'day_l53': 24.0,\n",
       " 'dayofweek_l53': 0.0,\n",
       " 'hour_l53': 8.0,\n",
       " 'open_l53': 1045.6,\n",
       " 'low_l53': 1041.0,\n",
       " 'high_l53': 1048.8,\n",
       " 'close_l53': 1046.0,\n",
       " 'volume_l53': 107974.0,\n",
       " 'year_l54': 2024.0,\n",
       " 'month_l54': 6.0,\n",
       " 'day_l54': 24.0,\n",
       " 'dayofweek_l54': 0.0,\n",
       " 'hour_l54': 7.0,\n",
       " 'open_l54': 1045.0,\n",
       " 'low_l54': 1040.0,\n",
       " 'high_l54': 1053.2,\n",
       " 'close_l54': 1045.0,\n",
       " 'volume_l54': 374723.0,\n",
       " 'year_l55': 2024.0,\n",
       " 'month_l55': 6.0,\n",
       " 'day_l55': 24.0,\n",
       " 'dayofweek_l55': 0.0,\n",
       " 'hour_l55': 6.0,\n",
       " 'open_l55': 1045.0,\n",
       " 'low_l55': 1045.0,\n",
       " 'high_l55': 1045.0,\n",
       " 'close_l55': 1045.0,\n",
       " 'volume_l55': 5401.0,\n",
       " 'year_l56': 2024.0,\n",
       " 'month_l56': 6.0,\n",
       " 'day_l56': 23.0,\n",
       " 'dayofweek_l56': 6.0,\n",
       " 'hour_l56': 20.0,\n",
       " 'open_l56': 1045.0,\n",
       " 'low_l56': 1040.0,\n",
       " 'high_l56': 1045.0,\n",
       " 'close_l56': 1040.0,\n",
       " 'volume_l56': 848.0,\n",
       " 'year_l57': 2024.0,\n",
       " 'month_l57': 6.0,\n",
       " 'day_l57': 23.0,\n",
       " 'dayofweek_l57': 6.0,\n",
       " 'hour_l57': 19.0,\n",
       " 'open_l57': 1044.2,\n",
       " 'low_l57': 1043.0,\n",
       " 'high_l57': 1046.0,\n",
       " 'close_l57': 1045.0,\n",
       " 'volume_l57': 4460.0,\n",
       " 'year_l58': 2024.0,\n",
       " 'month_l58': 6.0,\n",
       " 'day_l58': 23.0,\n",
       " 'dayofweek_l58': 6.0,\n",
       " 'hour_l58': 18.0,\n",
       " 'open_l58': 1044.8,\n",
       " 'low_l58': 1043.0,\n",
       " 'high_l58': 1045.0,\n",
       " 'close_l58': 1044.0,\n",
       " 'volume_l58': 9921.0,\n",
       " 'year_l59': 2024.0,\n",
       " 'month_l59': 6.0,\n",
       " 'day_l59': 23.0,\n",
       " 'dayofweek_l59': 6.0,\n",
       " 'hour_l59': 17.0,\n",
       " 'open_l59': 1044.0,\n",
       " 'low_l59': 1043.0,\n",
       " 'high_l59': 1044.8,\n",
       " 'close_l59': 1044.0,\n",
       " 'volume_l59': 5471.0,\n",
       " 'year_l60': 2024.0,\n",
       " 'month_l60': 6.0,\n",
       " 'day_l60': 23.0,\n",
       " 'dayofweek_l60': 6.0,\n",
       " 'hour_l60': 16.0,\n",
       " 'open_l60': 1043.6,\n",
       " 'low_l60': 1039.0,\n",
       " 'high_l60': 1044.4,\n",
       " 'close_l60': 1043.0,\n",
       " 'volume_l60': 5151.0,\n",
       " 'year_l61': 2024.0,\n",
       " 'month_l61': 6.0,\n",
       " 'day_l61': 23.0,\n",
       " 'dayofweek_l61': 6.0,\n",
       " 'hour_l61': 15.0,\n",
       " 'open_l61': 1040.0,\n",
       " 'low_l61': 1039.0,\n",
       " 'high_l61': 1044.0,\n",
       " 'close_l61': 1043.0,\n",
       " 'volume_l61': 5354.0,\n",
       " 'year_l62': 2024.0,\n",
       " 'month_l62': 6.0,\n",
       " 'day_l62': 23.0,\n",
       " 'dayofweek_l62': 6.0,\n",
       " 'hour_l62': 14.0,\n",
       " 'open_l62': 1040.4,\n",
       " 'low_l62': 1037.0,\n",
       " 'high_l62': 1041.0,\n",
       " 'close_l62': 1041.0,\n",
       " 'volume_l62': 2400.0,\n",
       " 'year_l63': 2024.0,\n",
       " 'month_l63': 6.0,\n",
       " 'day_l63': 23.0,\n",
       " 'dayofweek_l63': 6.0,\n",
       " 'hour_l63': 13.0,\n",
       " 'open_l63': 1038.6,\n",
       " 'low_l63': 1037.0,\n",
       " 'high_l63': 1041.8,\n",
       " 'close_l63': 1040.0,\n",
       " 'volume_l63': 7820.0,\n",
       " 'year_l64': 2024.0,\n",
       " 'month_l64': 6.0,\n",
       " 'day_l64': 23.0,\n",
       " 'dayofweek_l64': 6.0,\n",
       " 'hour_l64': 12.0,\n",
       " 'open_l64': 1038.0,\n",
       " 'low_l64': 1036.0,\n",
       " 'high_l64': 1038.8,\n",
       " 'close_l64': 1037.0,\n",
       " 'volume_l64': 2294.0,\n",
       " 'year_l65': 2024.0,\n",
       " 'month_l65': 6.0,\n",
       " 'day_l65': 23.0,\n",
       " 'dayofweek_l65': 6.0,\n",
       " 'hour_l65': 11.0,\n",
       " 'open_l65': 1037.0,\n",
       " 'low_l65': 1036.0,\n",
       " 'high_l65': 1038.8,\n",
       " 'close_l65': 1037.0,\n",
       " 'volume_l65': 5240.0,\n",
       " 'year_l66': 2024.0,\n",
       " 'month_l66': 6.0,\n",
       " 'day_l66': 23.0,\n",
       " 'dayofweek_l66': 6.0,\n",
       " 'hour_l66': 10.0,\n",
       " 'open_l66': 1035.8,\n",
       " 'low_l66': 1035.0,\n",
       " 'high_l66': 1037.6,\n",
       " 'close_l66': 1037.0,\n",
       " 'volume_l66': 6498.0,\n",
       " 'year_l67': 2024.0,\n",
       " 'month_l67': 6.0,\n",
       " 'day_l67': 23.0,\n",
       " 'dayofweek_l67': 6.0,\n",
       " 'hour_l67': 9.0,\n",
       " 'open_l67': 1036.4,\n",
       " 'low_l67': 1035.0,\n",
       " 'high_l67': 1037.0,\n",
       " 'close_l67': 1035.0,\n",
       " 'volume_l67': 5785.0,\n",
       " 'year_l68': 2024.0,\n",
       " 'month_l68': 6.0,\n",
       " 'day_l68': 23.0,\n",
       " 'dayofweek_l68': 6.0,\n",
       " 'hour_l68': 8.0,\n",
       " 'open_l68': 1036.6,\n",
       " 'low_l68': 1035.0,\n",
       " 'high_l68': 1036.6,\n",
       " 'close_l68': 1035.0,\n",
       " 'volume_l68': 1512.0,\n",
       " 'year_l69': 2024.0,\n",
       " 'month_l69': 6.0,\n",
       " 'day_l69': 23.0,\n",
       " 'dayofweek_l69': 6.0,\n",
       " 'hour_l69': 7.0,\n",
       " 'open_l69': 1037.8,\n",
       " 'low_l69': 1035.0,\n",
       " 'high_l69': 1037.8,\n",
       " 'close_l69': 1035.0,\n",
       " 'volume_l69': 4861.0,\n",
       " 'year_l70': 2024.0,\n",
       " 'month_l70': 6.0,\n",
       " 'day_l70': 22.0,\n",
       " 'dayofweek_l70': 5.0,\n",
       " 'hour_l70': 20.0,\n",
       " 'open_l70': 1037.8,\n",
       " 'low_l70': 1035.0,\n",
       " 'high_l70': 1037.8,\n",
       " 'close_l70': 1037.0,\n",
       " 'volume_l70': 320.0,\n",
       " 'year_l71': 2024.0,\n",
       " 'month_l71': 6.0,\n",
       " 'day_l71': 22.0,\n",
       " 'dayofweek_l71': 5.0,\n",
       " 'hour_l71': 19.0,\n",
       " 'open_l71': 1035.6,\n",
       " 'low_l71': 1035.0,\n",
       " 'high_l71': 1037.8,\n",
       " 'close_l71': 1037.0,\n",
       " 'volume_l71': 766.0,\n",
       " 'year_l72': 2024.0,\n",
       " 'month_l72': 6.0,\n",
       " 'day_l72': 22.0,\n",
       " 'dayofweek_l72': 5.0,\n",
       " 'hour_l72': 18.0,\n",
       " 'open_l72': 1035.4,\n",
       " 'low_l72': 1035.0,\n",
       " 'high_l72': 1036.8,\n",
       " 'close_l72': 1036.0,\n",
       " 'volume_l72': 2354.0,\n",
       " 'year_l73': 2024.0,\n",
       " 'month_l73': 6.0,\n",
       " 'day_l73': 22.0,\n",
       " 'dayofweek_l73': 5.0,\n",
       " 'hour_l73': 17.0,\n",
       " 'open_l73': 1036.6,\n",
       " 'low_l73': 1035.0,\n",
       " 'high_l73': 1036.6,\n",
       " 'close_l73': 1035.0,\n",
       " 'volume_l73': 1056.0,\n",
       " 'year_l74': 2024.0,\n",
       " 'month_l74': 6.0,\n",
       " 'day_l74': 22.0,\n",
       " 'dayofweek_l74': 5.0,\n",
       " 'hour_l74': 16.0,\n",
       " 'open_l74': 1037.8,\n",
       " 'low_l74': 1035.0,\n",
       " 'high_l74': 1038.0,\n",
       " 'close_l74': 1036.0,\n",
       " 'volume_l74': 2890.0,\n",
       " 'year_l75': 2024.0,\n",
       " 'month_l75': 6.0,\n",
       " 'day_l75': 22.0,\n",
       " 'dayofweek_l75': 5.0,\n",
       " 'hour_l75': 15.0,\n",
       " 'open_l75': 1037.2,\n",
       " 'low_l75': 1035.0,\n",
       " 'high_l75': 1038.0,\n",
       " 'close_l75': 1037.0,\n",
       " 'volume_l75': 1116.0,\n",
       " 'year_l76': 2024.0,\n",
       " 'month_l76': 6.0,\n",
       " 'day_l76': 22.0,\n",
       " 'dayofweek_l76': 5.0,\n",
       " 'hour_l76': 14.0,\n",
       " 'open_l76': 1036.4,\n",
       " 'low_l76': 1035.0,\n",
       " 'high_l76': 1037.6,\n",
       " 'close_l76': 1037.0,\n",
       " 'volume_l76': 2712.0,\n",
       " 'year_l77': 2024.0,\n",
       " 'month_l77': 6.0,\n",
       " 'day_l77': 22.0,\n",
       " 'dayofweek_l77': 5.0,\n",
       " 'hour_l77': 13.0,\n",
       " 'open_l77': 1037.0,\n",
       " 'low_l77': 1035.0,\n",
       " 'high_l77': 1037.8,\n",
       " 'close_l77': 1036.0,\n",
       " 'volume_l77': 3886.0,\n",
       " 'year_l78': 2024.0,\n",
       " 'month_l78': 6.0,\n",
       " 'day_l78': 22.0,\n",
       " 'dayofweek_l78': 5.0,\n",
       " 'hour_l78': 12.0,\n",
       " 'open_l78': 1036.8,\n",
       " 'low_l78': 1035.0,\n",
       " 'high_l78': 1038.2,\n",
       " 'close_l78': 1037.0,\n",
       " 'volume_l78': 1938.0,\n",
       " 'year_l79': 2024.0,\n",
       " 'month_l79': 6.0,\n",
       " 'day_l79': 22.0,\n",
       " 'dayofweek_l79': 5.0,\n",
       " 'hour_l79': 11.0,\n",
       " 'open_l79': 1037.4,\n",
       " 'low_l79': 1035.0,\n",
       " 'high_l79': 1037.4,\n",
       " 'close_l79': 1035.0,\n",
       " 'volume_l79': 2948.0,\n",
       " 'year_l80': 2024.0,\n",
       " 'month_l80': 6.0,\n",
       " 'day_l80': 22.0,\n",
       " 'dayofweek_l80': 5.0,\n",
       " 'hour_l80': 10.0,\n",
       " 'open_l80': 1037.0,\n",
       " 'low_l80': 1035.0,\n",
       " 'high_l80': 1038.6,\n",
       " 'close_l80': 1037.0,\n",
       " 'volume_l80': 4570.0,\n",
       " 'year_l81': 2024.0,\n",
       " 'month_l81': 6.0,\n",
       " 'day_l81': 21.0,\n",
       " 'dayofweek_l81': 4.0,\n",
       " 'hour_l81': 10.0,\n",
       " 'open_l81': 1041.6,\n",
       " 'low_l81': 1041.0,\n",
       " 'high_l81': 1050.0,\n",
       " 'close_l81': 1047.0,\n",
       " 'volume_l81': 104105.0,\n",
       " 'year_l82': 2024.0,\n",
       " 'month_l82': 6.0,\n",
       " 'day_l82': 20.0,\n",
       " 'dayofweek_l82': 3.0,\n",
       " 'hour_l82': 6.0,\n",
       " 'open_l82': 1054.8,\n",
       " 'low_l82': 1054.0,\n",
       " 'high_l82': 1054.8,\n",
       " 'close_l82': 1054.0,\n",
       " 'volume_l82': 6713.0,\n",
       " 'year_l83': 2024.0,\n",
       " 'month_l83': 6.0,\n",
       " 'day_l83': 22.0,\n",
       " 'dayofweek_l83': 5.0,\n",
       " 'hour_l83': 9.0,\n",
       " 'open_l83': 1038.6,\n",
       " 'low_l83': 1035.0,\n",
       " 'high_l83': 1039.0,\n",
       " 'close_l83': 1035.0,\n",
       " 'volume_l83': 15889.0,\n",
       " 'year_l84': 2024.0,\n",
       " 'month_l84': 6.0,\n",
       " 'day_l84': 22.0,\n",
       " 'dayofweek_l84': 5.0,\n",
       " 'hour_l84': 8.0,\n",
       " 'open_l84': 1040.0,\n",
       " 'low_l84': 1036.0,\n",
       " 'high_l84': 1040.6,\n",
       " 'close_l84': 1036.0,\n",
       " 'volume_l84': 5678.0,\n",
       " 'year_l85': 2024.0,\n",
       " 'month_l85': 6.0,\n",
       " 'day_l85': 22.0,\n",
       " 'dayofweek_l85': 5.0,\n",
       " 'hour_l85': 7.0,\n",
       " 'open_l85': 1035.8,\n",
       " 'low_l85': 1035.0,\n",
       " 'high_l85': 1040.8,\n",
       " 'close_l85': 1040.0,\n",
       " 'volume_l85': 5927.0,\n",
       " 'year_l86': 2024.0,\n",
       " 'month_l86': 6.0,\n",
       " 'day_l86': 21.0,\n",
       " 'dayofweek_l86': 4.0,\n",
       " 'hour_l86': 20.0,\n",
       " 'open_l86': 1041.8,\n",
       " 'low_l86': 1039.0,\n",
       " 'high_l86': 1042.0,\n",
       " 'close_l86': 1040.0,\n",
       " 'volume_l86': 38367.0,\n",
       " 'year_l87': 2024.0,\n",
       " 'month_l87': 6.0,\n",
       " 'day_l87': 21.0,\n",
       " 'dayofweek_l87': 4.0,\n",
       " 'hour_l87': 19.0,\n",
       " 'open_l87': 1041.4,\n",
       " 'low_l87': 1041.0,\n",
       " 'high_l87': 1042.8,\n",
       " 'close_l87': 1041.0,\n",
       " 'volume_l87': 25188.0,\n",
       " 'year_l88': 2024.0,\n",
       " 'month_l88': 6.0,\n",
       " 'day_l88': 21.0,\n",
       " 'dayofweek_l88': 4.0,\n",
       " 'hour_l88': 18.0,\n",
       " 'open_l88': 1042.4,\n",
       " 'low_l88': 1040.0,\n",
       " 'high_l88': 1042.4,\n",
       " 'close_l88': 1041.0,\n",
       " 'volume_l88': 21950.0,\n",
       " 'year_l89': 2024.0,\n",
       " 'month_l89': 6.0,\n",
       " 'day_l89': 21.0,\n",
       " 'dayofweek_l89': 4.0,\n",
       " 'hour_l89': 17.0,\n",
       " 'open_l89': 1040.2,\n",
       " 'low_l89': 1040.0,\n",
       " 'high_l89': 1044.0,\n",
       " 'close_l89': 1042.0,\n",
       " 'volume_l89': 29238.0,\n",
       " 'year_l90': 2024.0,\n",
       " 'month_l90': 6.0,\n",
       " 'day_l90': 21.0,\n",
       " 'dayofweek_l90': 4.0,\n",
       " 'hour_l90': 16.0,\n",
       " 'open_l90': 1042.4,\n",
       " 'low_l90': 1035.0,\n",
       " 'high_l90': 1045.8,\n",
       " 'close_l90': 1040.0,\n",
       " 'volume_l90': 122476.0,\n",
       " 'year_l91': 2024.0,\n",
       " 'month_l91': 6.0,\n",
       " 'day_l91': 21.0,\n",
       " 'dayofweek_l91': 4.0,\n",
       " 'hour_l91': 15.0,\n",
       " 'open_l91': 1046.0,\n",
       " 'low_l91': 1043.0,\n",
       " 'high_l91': 1046.2,\n",
       " 'close_l91': 1044.0,\n",
       " 'volume_l91': 70166.0,\n",
       " 'year_l92': 2024.0,\n",
       " 'month_l92': 6.0,\n",
       " 'day_l92': 21.0,\n",
       " 'dayofweek_l92': 4.0,\n",
       " 'hour_l92': 14.0,\n",
       " 'open_l92': 1047.8,\n",
       " 'low_l92': 1043.0,\n",
       " 'high_l92': 1047.8,\n",
       " 'close_l92': 1046.0,\n",
       " 'volume_l92': 70214.0,\n",
       " 'year_l93': 2024.0,\n",
       " 'month_l93': 6.0,\n",
       " 'day_l93': 21.0,\n",
       " 'dayofweek_l93': 4.0,\n",
       " 'hour_l93': 13.0,\n",
       " 'open_l93': 1048.0,\n",
       " 'low_l93': 1044.0,\n",
       " 'high_l93': 1052.6,\n",
       " 'close_l93': 1047.0,\n",
       " 'volume_l93': 91655.0,\n",
       " 'year_l94': 2024.0,\n",
       " 'month_l94': 6.0,\n",
       " 'day_l94': 21.0,\n",
       " 'dayofweek_l94': 4.0,\n",
       " 'hour_l94': 12.0,\n",
       " 'open_l94': 1045.2,\n",
       " 'low_l94': 1044.0,\n",
       " 'high_l94': 1053.4,\n",
       " 'close_l94': 1048.0,\n",
       " 'volume_l94': 121779.0,\n",
       " 'year_l95': 2024.0,\n",
       " 'month_l95': 6.0,\n",
       " 'day_l95': 21.0,\n",
       " 'dayofweek_l95': 4.0,\n",
       " 'hour_l95': 11.0,\n",
       " 'open_l95': 1047.6,\n",
       " 'low_l95': 1042.0,\n",
       " 'high_l95': 1050.0,\n",
       " 'close_l95': 1045.0,\n",
       " 'volume_l95': 91462.0,\n",
       " 'year_l96': 2024.0,\n",
       " 'month_l96': 6.0,\n",
       " 'day_l96': 21.0,\n",
       " 'dayofweek_l96': 4.0,\n",
       " 'hour_l96': 9.0,\n",
       " 'open_l96': 1047.0,\n",
       " 'low_l96': 1041.0,\n",
       " 'high_l96': 1047.8,\n",
       " 'close_l96': 1041.0,\n",
       " 'volume_l96': 93214.0,\n",
       " 'year_l97': 2024.0,\n",
       " 'month_l97': 6.0,\n",
       " 'day_l97': 21.0,\n",
       " 'dayofweek_l97': 4.0,\n",
       " 'hour_l97': 8.0,\n",
       " 'open_l97': 1048.4,\n",
       " 'low_l97': 1043.0,\n",
       " 'high_l97': 1051.0,\n",
       " 'close_l97': 1046.0,\n",
       " 'volume_l97': 115203.0,\n",
       " 'year_l98': 2024.0,\n",
       " 'month_l98': 6.0,\n",
       " 'day_l98': 21.0,\n",
       " 'dayofweek_l98': 4.0,\n",
       " 'hour_l98': 7.0,\n",
       " 'open_l98': 1053.2,\n",
       " 'low_l98': 1041.0,\n",
       " 'high_l98': 1058.0,\n",
       " 'close_l98': 1048.0,\n",
       " 'volume_l98': 415157.0,\n",
       " 'year_l99': 2024.0,\n",
       " 'month_l99': 6.0,\n",
       " 'day_l99': 21.0,\n",
       " 'dayofweek_l99': 4.0,\n",
       " 'hour_l99': 6.0,\n",
       " 'open_l99': 1053.0,\n",
       " 'low_l99': 1053.0,\n",
       " 'high_l99': 1053.0,\n",
       " 'close_l99': 1053.0,\n",
       " 'volume_l99': 6832.0,\n",
       " 'year_l100': 2024.0,\n",
       " 'month_l100': 6.0,\n",
       " 'day_l100': 20.0,\n",
       " 'dayofweek_l100': 3.0,\n",
       " 'hour_l100': 20.0,\n",
       " 'open_l100': 1059.2,\n",
       " 'low_l100': 1054.0,\n",
       " 'high_l100': 1060.6,\n",
       " 'close_l100': 1054.0,\n",
       " 'volume_l100': 50285.0,\n",
       " ...}"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "new_row"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "a7295bd1-6d92-46d6-b4d4-4d57bbb1e8ba",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>year_l1</th>\n",
       "      <th>month_l1</th>\n",
       "      <th>day_l1</th>\n",
       "      <th>dayofweek_l1</th>\n",
       "      <th>hour_l1</th>\n",
       "      <th>open_l1</th>\n",
       "      <th>low_l1</th>\n",
       "      <th>high_l1</th>\n",
       "      <th>close_l1</th>\n",
       "      <th>volume_l1</th>\n",
       "      <th>...</th>\n",
       "      <th>year_l200</th>\n",
       "      <th>month_l200</th>\n",
       "      <th>day_l200</th>\n",
       "      <th>dayofweek_l200</th>\n",
       "      <th>hour_l200</th>\n",
       "      <th>open_l200</th>\n",
       "      <th>low_l200</th>\n",
       "      <th>high_l200</th>\n",
       "      <th>close_l200</th>\n",
       "      <th>volume_l200</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2024.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>27.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>15.0</td>\n",
       "      <td>1050.6</td>\n",
       "      <td>1049.0</td>\n",
       "      <td>1051.4</td>\n",
       "      <td>1050.0</td>\n",
       "      <td>15297.0</td>\n",
       "      <td>...</td>\n",
       "      <td>2024.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>14.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>7.0</td>\n",
       "      <td>1050.0</td>\n",
       "      <td>1044.0</td>\n",
       "      <td>1064.4</td>\n",
       "      <td>1058.0</td>\n",
       "      <td>484532.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1 rows × 2000 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   year_l1  month_l1  day_l1  dayofweek_l1  hour_l1  open_l1  low_l1  high_l1  \\\n",
       "0   2024.0       6.0    27.0           3.0     15.0   1050.6  1049.0   1051.4   \n",
       "\n",
       "   close_l1  volume_l1  ...  year_l200  month_l200  day_l200  dayofweek_l200  \\\n",
       "0    1050.0    15297.0  ...     2024.0         6.0      14.0             4.0   \n",
       "\n",
       "   hour_l200  open_l200  low_l200  high_l200  close_l200  volume_l200  \n",
       "0        7.0     1050.0    1044.0     1064.4      1058.0     484532.0  \n",
       "\n",
       "[1 rows x 2000 columns]"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2 = pd.DataFrame.from_dict(new_row, orient='index').T\n",
    "df2.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "c7e7e7b5-2cf9-48b7-b7cd-704d03aaa434",
   "metadata": {},
   "outputs": [],
   "source": [
    "pred_next_hour = model.predict(df2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "2ac0b4dc-06df-4c81-9090-380649cff7ac",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1050.6278764446183"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pred_next_hour[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c6757016-1c4d-440b-95fb-155500af1d8e",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
